Skip to content

Commit fda9622

Browse files
authored
feat: add new sql-server roles (#699)
* feat: add new sql-server roles * feat: remove role validation
1 parent 380ff8c commit fda9622

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

docs/data-sources/sqlserverflex_user.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ data "stackit_sqlserverflex_user" "example" {
3434
- `host` (String)
3535
- `id` (String) Terraform's internal data source. ID. It is structured as "`project_id`,`instance_id`,`user_id`".
3636
- `port` (Number)
37-
- `roles` (Set of String) Database access levels for the user. Possible values: [`##STACKIT_LoginManager##`, `##STACKIT_DatabaseManager##`]
37+
- `roles` (Set of String) Database access levels for the user.
3838
- `username` (String) Username of the SQLServer Flex instance.

docs/resources/sqlserverflex_user.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ resource "stackit_sqlserverflex_user" "example" {
3232

3333
### Optional
3434

35-
- `roles` (Set of String) Database access levels for the user. Possible values: [`##STACKIT_LoginManager##`, `##STACKIT_DatabaseManager##`]
35+
- `roles` (Set of String) Database access levels for the user.
3636

3737
### Read-Only
3838

stackit/internal/services/sqlserverflex/user/datasource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func (r *userDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, r
9696
"instance_id": "ID of the SQLServer Flex instance.",
9797
"project_id": "STACKIT project ID to which the instance is associated.",
9898
"username": "Username of the SQLServer Flex instance.",
99-
"roles": "Database access levels for the user. Possible values: [`##STACKIT_LoginManager##`, `##STACKIT_DatabaseManager##`]",
99+
"roles": "Database access levels for the user.",
100100
"password": "Password of the user account.",
101101
}
102102

stackit/internal/services/sqlserverflex/user/resource.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ import (
66
"net/http"
77
"strings"
88

9-
"github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
109
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
1110
"github.com/hashicorp/terraform-plugin-log/tflog"
1211
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
1312
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
1413
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
1514

16-
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
1715
"github.com/hashicorp/terraform-plugin-framework/attr"
1816
"github.com/hashicorp/terraform-plugin-framework/path"
1917
"github.com/hashicorp/terraform-plugin-framework/resource"
@@ -106,7 +104,7 @@ func (r *userResource) Schema(_ context.Context, _ resource.SchemaRequest, resp
106104
"instance_id": "ID of the SQLServer Flex instance.",
107105
"project_id": "STACKIT project ID to which the instance is associated.",
108106
"username": "Username of the SQLServer Flex instance.",
109-
"roles": "Database access levels for the user. Possible values: [`##STACKIT_LoginManager##`, `##STACKIT_DatabaseManager##`]",
107+
"roles": "Database access levels for the user.",
110108
"password": "Password of the user account.",
111109
}
112110

@@ -169,11 +167,6 @@ func (r *userResource) Schema(_ context.Context, _ resource.SchemaRequest, resp
169167
PlanModifiers: []planmodifier.Set{
170168
setplanmodifier.RequiresReplace(),
171169
},
172-
Validators: []validator.Set{
173-
setvalidator.ValueStringsAre(
174-
stringvalidator.OneOf("##STACKIT_LoginManager##", "##STACKIT_DatabaseManager##"),
175-
),
176-
},
177170
},
178171
"password": schema.StringAttribute{
179172
Description: descriptions["password"],

0 commit comments

Comments
 (0)