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:
Marcel S. Henselin 2025-12-22 09:41:03 +01:00 committed by GitHub
parent 9e04ab2630
commit f0414ab3b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 1 deletions

View file

@ -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
View 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"]
}

View file

@ -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,