Feat/alpa sqlserver user (#13)
* fix: update API client references to use sqlserverflexalpha package * chore: add stackit_sqlserverflexalpha_user resource and instance_id variable * fix: refactor sqlserverflexalpha user resource and enhance schema with status and default_database --------- Co-authored-by: Andre Harms <andre.harms@stackit.cloud>
This commit is contained in:
parent
9e04ab2630
commit
f0414ab3b9
3 changed files with 14 additions and 1 deletions
|
|
@ -1 +1,8 @@
|
|||
# see other files
|
||||
|
||||
resource "stackit_sqlserverflexalpha_user" "ptlsdbuser" {
|
||||
project_id = stackitalpha_postgresflexalpha_instance.ptlsdbsrv.project_id
|
||||
instance_id = stackitalpha_postgresflexalpha_instance.ptlsdbsrv.id
|
||||
username = var.db_username
|
||||
roles = ["login"]
|
||||
}
|
||||
|
|
|
|||
6
sample/user.tf
Normal file
6
sample/user.tf
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
resource "stackit_sqlserverflexalpha_user" "ptlsdbuser" {
|
||||
project_id = stackitalpha_postgresflexalpha_instance.ptlsdbsrv.project_id
|
||||
instance_id = stackitalpha_postgresflexalpha_instance.ptlsdbsrv.id
|
||||
username = var.db_username
|
||||
roles = ["createdb", "login", "createrole"]
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@ func ConfigureClient(
|
|||
} else {
|
||||
apiClientConfigOptions = append(apiClientConfigOptions, config.WithRegion(providerData.GetRegion()))
|
||||
}
|
||||
apiClient, err := sqlserverflex.NewAPIClient(apiClientConfigOptions...)
|
||||
apiClient, err := sqlserverflexalpha.NewAPIClient(apiClientConfigOptions...)
|
||||
if err != nil {
|
||||
core.LogAndAddError(
|
||||
ctx,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue