chore: add tests
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 7s
CI Workflow / CI (pull_request) Failing after 7m36s
CI Workflow / Code coverage report (pull_request) Has been skipped
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 15m19s
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 7s
CI Workflow / CI (pull_request) Failing after 7m36s
CI Workflow / Code coverage report (pull_request) Has been skipped
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 15m19s
This commit is contained in:
parent
f2bffa9ece
commit
3aa60a57e7
6 changed files with 469 additions and 2 deletions
|
|
@ -28,3 +28,27 @@ resource "stackitprivatepreview_postgresflexalpha_instance" "{{ .TfName }}" {
|
|||
}
|
||||
version = {{ .Version }}
|
||||
}
|
||||
|
||||
{{ if .Users }}
|
||||
{{ $tfName := .TfName }}
|
||||
{{ range $user := .Users }}
|
||||
resource "stackitprivatepreview_postgresflexalpha_user" "{{ $user.Name }}" {
|
||||
project_id = "{{ $user.ProjectId }}"
|
||||
instance_id = stackitprivatepreview_postgresflexalpha_instance.{{ $tfName }}.instance_id
|
||||
name = "{{ $user.Name }}"
|
||||
roles = [{{ range $i, $v := $user.Roles }}{{if $i}},{{end}}"{{$v}}"{{end}}]
|
||||
}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Databases }}
|
||||
{{ $tfName := .TfName }}
|
||||
{{ range $db := .Databases }}
|
||||
resource "stackitprivatepreview_postgresflexalpha_database" "{{ $db.Name }}" {
|
||||
project_id = "{{ $db.ProjectId }}"
|
||||
instance_id = stackitprivatepreview_postgresflexalpha_instance.{{ $tfName }}.instance_id
|
||||
name = "{{ $db.Name }}"
|
||||
owner = "{{ $db.Owner }}"
|
||||
}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue