chore: work save
This commit is contained in:
parent
979220be66
commit
2abd4e2c72
4 changed files with 25 additions and 9 deletions
9
Makefile
9
Makefile
|
|
@ -1,5 +1,6 @@
|
|||
ROOT_DIR ?= $(shell git rev-parse --show-toplevel)
|
||||
SCRIPTS_BASE ?= $(ROOT_DIR)/scripts
|
||||
VERSION ?= ${VER}
|
||||
|
||||
# SETUP AND TOOL INITIALIZATION TASKS
|
||||
project-help:
|
||||
|
|
@ -57,3 +58,11 @@ test-acceptance-tf:
|
|||
TF_ACC_REGION=$(TF_ACC_REGION) \
|
||||
go test ./... -count=1 -timeout=30m && \
|
||||
cd $(ROOT_DIR)
|
||||
|
||||
publish: build
|
||||
ifeq ($(strip $(VERSION)),)
|
||||
@echo "please call like this: VER=0.1.0 make publish"
|
||||
else
|
||||
@echo "version: $(VERSION)"
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -51,22 +51,23 @@ resource "stackitprivatepreview_postgresflexalpha_user" "ptlsdbuser" {
|
|||
}
|
||||
|
||||
resource "stackitprivatepreview_postgresflexalpha_database" "example" {
|
||||
count = 25
|
||||
depends_on = [stackitprivatepreview_postgresflexalpha_user.ptlsdbadminuser]
|
||||
project_id = var.project_id
|
||||
instance_id = stackitprivatepreview_postgresflexalpha_instance.msh-sna-pe-example.instance_id
|
||||
name = var.db_name
|
||||
name = "${var.db_name}${count.index}"
|
||||
owner = var.db_admin_username
|
||||
}
|
||||
|
||||
data "stackitprivatepreview_postgresflexalpha_instance" "datapsql" {
|
||||
project_id = var.project_id
|
||||
instance_id = var.instance_id
|
||||
region = "eu01"
|
||||
}
|
||||
# data "stackitprivatepreview_postgresflexalpha_instance" "datapsql" {
|
||||
# project_id = var.project_id
|
||||
# instance_id = var.instance_id
|
||||
# region = "eu01"
|
||||
# }
|
||||
|
||||
output "psql_instance_id" {
|
||||
value = data.stackitprivatepreview_postgresflexalpha_instance.datapsql.instance_id
|
||||
}
|
||||
# output "psql_instance_id" {
|
||||
# value = data.stackitprivatepreview_postgresflexalpha_instance.datapsql.instance_id
|
||||
# }
|
||||
|
||||
output "psql_user_password" {
|
||||
value = stackitprivatepreview_postgresflexalpha_user.ptlsdbuser.password
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ package postgresflex_test
|
|||
|
||||
import (
|
||||
"context"
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"strings"
|
||||
"testing"
|
||||
|
|
@ -20,6 +21,11 @@ import (
|
|||
postgresflex "github.com/mhenselin/terraform-provider-stackitprivatepreview/pkg/postgresflexalpha"
|
||||
)
|
||||
|
||||
var (
|
||||
//go:embed testdata/resource-complete.tf
|
||||
resourceSecurityGroupMinConfig string
|
||||
)
|
||||
|
||||
// Instance resource data
|
||||
var instanceResource = map[string]string{
|
||||
"project_id": testutil.ProjectId,
|
||||
|
|
|
|||
0
stackit/internal/services/postgresflexalpha/testdata/resource-complete.tf
vendored
Normal file
0
stackit/internal/services/postgresflexalpha/testdata/resource-complete.tf
vendored
Normal file
Loading…
Add table
Add a link
Reference in a new issue