chore: work save
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 4s
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 4m15s
CI Workflow / CI run tests (pull_request) Failing after 5m59s
CI Workflow / CI run build and linting (pull_request) Failing after 6m54s
CI Workflow / Code coverage report (pull_request) Has been skipped
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 4s
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 4m15s
CI Workflow / CI run tests (pull_request) Failing after 5m59s
CI Workflow / CI run build and linting (pull_request) Failing after 6m54s
CI Workflow / Code coverage report (pull_request) Has been skipped
This commit is contained in:
parent
7f5802aff0
commit
a203e6ff93
51 changed files with 14771 additions and 13 deletions
60
stackit/internal/services/sqlserverflexbeta/testdata/instance_template.gompl
vendored
Normal file
60
stackit/internal/services/sqlserverflexbeta/testdata/instance_template.gompl
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
provider "stackitprivatepreview" {
|
||||
default_region = "{{ .Region }}"
|
||||
service_account_key_path = "{{ .ServiceAccountFilePath }}"
|
||||
}
|
||||
|
||||
resource "stackitprivatepreview_sqlserverflexbeta_instance" "{{ .TfName }}" {
|
||||
project_id = "{{ .ProjectId }}"
|
||||
name = "{{ .Name }}"
|
||||
backup_schedule = "{{ .BackupSchedule }}"
|
||||
retention_days = {{ .RetentionDays }}
|
||||
flavor_id = "{{ .FlavorId }}"
|
||||
storage = {
|
||||
class = "{{ .PerformanceClass }}"
|
||||
size = {{ .Size }}
|
||||
}
|
||||
{{ if .UseEncryption }}
|
||||
encryption = {
|
||||
kek_key_id = "{{ .KekKeyId }}"
|
||||
kek_key_ring_id = "{{ .KekKeyRingId }}"
|
||||
kek_key_version = {{ .KekKeyVersion }}
|
||||
service_account = "{{ .KekServiceAccount }}"
|
||||
}
|
||||
{{ end }}
|
||||
network = {
|
||||
acl = ["{{ .AclString }}"]
|
||||
access_scope = "{{ .AccessScope }}"
|
||||
}
|
||||
version = "{{ .Version }}"
|
||||
}
|
||||
|
||||
{{ if .Users }}
|
||||
{{ $tfName := .TfName }}
|
||||
{{ range $user := .Users }}
|
||||
resource "stackitprivatepreview_sqlserverflexbeta_user" "{{ $user.Name }}" {
|
||||
project_id = "{{ $user.ProjectId }}"
|
||||
instance_id = stackitprivatepreview_sqlserverflexbeta_instance.{{ $tfName }}.instance_id
|
||||
username = "{{ $user.Name }}"
|
||||
roles = [{{ range $i, $v := $user.Roles }}{{if $i}},{{end}}"{{$v}}"{{end}}]
|
||||
}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Databases }}
|
||||
{{ $tfName := .TfName }}
|
||||
{{ range $db := .Databases }}
|
||||
resource "stackitprivatepreview_sqlserverflexbeta_database" "{{ $db.Name }}" {
|
||||
depends_on = [stackitprivatepreview_sqlserverflexbeta_user.{{ $db.Owner }}]
|
||||
project_id = "{{ $db.ProjectId }}"
|
||||
instance_id = stackitprivatepreview_sqlserverflexbeta_instance.{{ $tfName }}.instance_id
|
||||
name = "{{ $db.Name }}"
|
||||
owner = "{{ $db.Owner }}"
|
||||
{{ if $db.Collation }}
|
||||
collation = "{{ $db.Collation }}"
|
||||
{{ end }}
|
||||
{{ if $db.Compatibility }}
|
||||
compatibility = "{{ $db.Compatibility }}"
|
||||
{{ end }}
|
||||
}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue