Make roles optional (#432)
* make roles optional * check if roles is unknown * add descriptions * update docs * change role condition handling * Update stackit/internal/services/sqlserverflex/user/resource.go Co-authored-by: João Palet <joao.palet@outlook.com> * Update stackit/internal/services/sqlserverflex/user/datasource.go Co-authored-by: João Palet <joao.palet@outlook.com> * Update stackit/internal/services/sqlserverflex/user/datasource.go Co-authored-by: João Palet <joao.palet@outlook.com> * fix escapes * adapt unit tests * update docs * Update stackit/internal/services/sqlserverflex/user/datasource.go Co-authored-by: João Palet <joao.palet@outlook.com> * Update stackit/internal/services/sqlserverflex/user/resource.go Co-authored-by: João Palet <joao.palet@outlook.com> * adapt unit tests * update docs --------- Co-authored-by: João Palet <joao.palet@outlook.com>
This commit is contained in:
parent
9f82c3262b
commit
7fbb13c0b6
4 changed files with 32 additions and 16 deletions
|
|
@ -95,6 +95,9 @@ func (r *userDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, r
|
|||
"user_id": "User ID.",
|
||||
"instance_id": "ID of the SQLServer Flex instance.",
|
||||
"project_id": "STACKIT project ID to which the instance is associated.",
|
||||
"username": "Username of the SQLServer Flex instance.",
|
||||
"roles": "Database access levels for the user. Possible values: [`##STACKIT_LoginManager##`, `##STACKIT_DatabaseManager##`]",
|
||||
"password": "Password of the user account.",
|
||||
}
|
||||
|
||||
resp.Schema = schema.Schema{
|
||||
|
|
@ -128,9 +131,11 @@ func (r *userDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, r
|
|||
},
|
||||
},
|
||||
"username": schema.StringAttribute{
|
||||
Computed: true,
|
||||
Description: descriptions["username"],
|
||||
Computed: true,
|
||||
},
|
||||
"roles": schema.SetAttribute{
|
||||
Description: descriptions["roles"],
|
||||
ElementType: types.StringType,
|
||||
Computed: true,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue