|
8 | 8 |
|
9 | 9 | postgresflexUtils "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/postgresflex/utils" |
10 | 10 |
|
11 | | - "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" |
12 | | - "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" |
13 | 11 | "github.com/hashicorp/terraform-plugin-framework/schema/validator" |
14 | 12 | "github.com/hashicorp/terraform-plugin-log/tflog" |
15 | 13 | "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion" |
@@ -115,15 +113,13 @@ func (r *userResource) Configure(ctx context.Context, req resource.ConfigureRequ |
115 | 113 |
|
116 | 114 | // Schema defines the schema for the resource. |
117 | 115 | func (r *userResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { |
118 | | - rolesOptions := []string{"login", "createdb"} |
119 | | - |
120 | 116 | descriptions := map[string]string{ |
121 | 117 | "main": "Postgres Flex user resource schema. Must have a `region` specified in the provider configuration.", |
122 | 118 | "id": "Terraform's internal resource ID. It is structured as \"`project_id`,`region`,`instance_id`,`user_id`\".", |
123 | 119 | "user_id": "User ID.", |
124 | 120 | "instance_id": "ID of the PostgresFlex instance.", |
125 | 121 | "project_id": "STACKIT project ID to which the instance is associated.", |
126 | | - "roles": "Database access levels for the user. " + utils.FormatPossibleValues(rolesOptions...), |
| 122 | + "roles": "Database access levels for the user.", |
127 | 123 | "region": "The resource region. If not defined, the provider region is used.", |
128 | 124 | } |
129 | 125 |
|
@@ -181,11 +177,6 @@ func (r *userResource) Schema(_ context.Context, _ resource.SchemaRequest, resp |
181 | 177 | Description: descriptions["roles"], |
182 | 178 | ElementType: types.StringType, |
183 | 179 | Required: true, |
184 | | - Validators: []validator.Set{ |
185 | | - setvalidator.ValueStringsAre( |
186 | | - stringvalidator.OneOf("login", "createdb"), |
187 | | - ), |
188 | | - }, |
189 | 180 | }, |
190 | 181 | "password": schema.StringAttribute{ |
191 | 182 | Computed: true, |
|
0 commit comments