Skip to content

Commit bbbb3db

Browse files
chore(postgresflex): extend descriptions (#1170)
1 parent afa08fd commit bbbb3db

2 files changed

Lines changed: 15 additions & 11 deletions

File tree

docs/resources/postgresflex_instance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ import {
4343
### Required
4444

4545
- `acl` (List of String) The Access Control List (ACL) for the PostgresFlex instance.
46-
- `backup_schedule` (String)
46+
- `backup_schedule` (String) The schedule for on what time and how often the database backup will be created. Must be a valid cron expression using numeric minute and hour values, e.g: '0 2 * * *'.
4747
- `flavor` (Attributes) (see [below for nested schema](#nestedatt--flavor))
4848
- `name` (String) Instance name.
4949
- `project_id` (String) STACKIT project ID to which the instance is associated.
50-
- `replicas` (Number)
50+
- `replicas` (Number) How many replicas the instance should have. Valid values are 1 for single mode or 3 for replication.
5151
- `storage` (Attributes) (see [below for nested schema](#nestedatt--storage))
5252
- `version` (String)
5353

stackit/internal/services/postgresflex/instance/resource.go

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,15 @@ func (r *instanceResource) Configure(ctx context.Context, req resource.Configure
147147
// Schema defines the schema for the resource.
148148
func (r *instanceResource) Schema(_ context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
149149
descriptions := map[string]string{
150-
"main": "Postgres Flex instance resource schema. Must have a `region` specified in the provider configuration.",
151-
"id": "Terraform's internal resource ID. It is structured as \"`project_id`,`region`,`instance_id`\".",
152-
"instance_id": "ID of the PostgresFlex instance.",
153-
"project_id": "STACKIT project ID to which the instance is associated.",
154-
"name": "Instance name.",
155-
"acl": "The Access Control List (ACL) for the PostgresFlex instance.",
156-
"region": "The resource region. If not defined, the provider region is used.",
150+
"main": "Postgres Flex instance resource schema. Must have a `region` specified in the provider configuration.",
151+
"id": "Terraform's internal resource ID. It is structured as \"`project_id`,`region`,`instance_id`\".",
152+
"instance_id": "ID of the PostgresFlex instance.",
153+
"project_id": "STACKIT project ID to which the instance is associated.",
154+
"name": "Instance name.",
155+
"acl": "The Access Control List (ACL) for the PostgresFlex instance.",
156+
"region": "The resource region. If not defined, the provider region is used.",
157+
"backup_schedule": "The schedule for on what time and how often the database backup will be created. Must be a valid cron expression using numeric minute and hour values, e.g: '0 2 * * *'.",
158+
"replicas": "How many replicas the instance should have. Valid values are 1 for single mode or 3 for replication.",
157159
}
158160

159161
resp.Schema = schema.Schema{
@@ -206,7 +208,8 @@ func (r *instanceResource) Schema(_ context.Context, req resource.SchemaRequest,
206208
Required: true,
207209
},
208210
"backup_schedule": schema.StringAttribute{
209-
Required: true,
211+
Description: descriptions["backup_schedule"],
212+
Required: true,
210213
},
211214
"flavor": schema.SingleNestedAttribute{
212215
Required: true,
@@ -232,7 +235,8 @@ func (r *instanceResource) Schema(_ context.Context, req resource.SchemaRequest,
232235
},
233236
},
234237
"replicas": schema.Int64Attribute{
235-
Required: true,
238+
Description: descriptions["replicas"],
239+
Required: true,
236240
},
237241
"storage": schema.SingleNestedAttribute{
238242
Required: true,

0 commit comments

Comments
 (0)