Add description for MongoDB Flex instance backup_schedule field (#282)

This commit is contained in:
João Palet 2024-03-04 15:55:07 +00:00 committed by GitHub
parent 646ce62447
commit f0890f9ddf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 18 additions and 13 deletions

View file

@ -76,12 +76,14 @@ func (r *instanceDataSource) Configure(ctx context.Context, req datasource.Confi
// Schema defines the schema for the data source.
func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
descriptions := map[string]string{
"main": "MongoDB Flex instance data source schema. Must have a `region` specified in the provider configuration.",
"id": "Terraform's internal data source. ID. It is structured as \"`project_id`,`instance_id`\".",
"instance_id": "ID of the MongoDB Flex instance.",
"project_id": "STACKIT project ID to which the instance is associated.",
"name": "Instance name.",
"acl": "The Access Control List (ACL) for the MongoDB Flex instance.",
"main": "MongoDB Flex instance data source schema. Must have a `region` specified in the provider configuration.",
"id": "Terraform's internal data source. ID. It is structured as \"`project_id`,`instance_id`\".",
"instance_id": "ID of the MongoDB Flex instance.",
"project_id": "STACKIT project ID to which the instance is associated.",
"name": "Instance name.",
"acl": "The Access Control List (ACL) for the MongoDB Flex instance.",
"backup_schedule": `The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").`,
"options": "Custom parameters for the MongoDB Flex instance.",
}
resp.Schema = schema.Schema{
@ -117,7 +119,8 @@ func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques
Computed: true,
},
"backup_schedule": schema.StringAttribute{
Computed: true,
Description: descriptions["backup_schedule"],
Computed: true,
},
"flavor": schema.SingleNestedAttribute{
Computed: true,
@ -154,7 +157,8 @@ func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques
Computed: true,
},
"options": schema.SingleNestedAttribute{
Computed: true,
Description: descriptions["options"],
Computed: true,
Attributes: map[string]schema.Attribute{
"type": schema.StringAttribute{
Computed: true,

View file

@ -204,7 +204,8 @@ func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, r
Required: true,
},
"backup_schedule": schema.StringAttribute{
Required: true,
Description: descriptions["backup_schedule"],
Required: true,
},
"flavor": schema.SingleNestedAttribute{
Required: true,