Skip to content

Commit

Permalink
Changing type of tags in schema
Browse files Browse the repository at this point in the history
  • Loading branch information
cveticm committed Oct 22, 2024
1 parent 264f7f5 commit a58236e
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions internal/service/flexcluster/data_source_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"

"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
"github.com/hashicorp/terraform-plugin-framework/types"
)

func DataSourceSchema(ctx context.Context) schema.Schema {
Expand Down Expand Up @@ -46,6 +47,11 @@ func dataSourceSchema(isPlural bool) map[string]schema.Attribute {
Computed: true,
MarkdownDescription: "Group of cloud provider settings that configure the provisioned MongoDB flex cluster.",
},
"tags": schema.MapAttribute{
ElementType: types.StringType,
Computed: true,
MarkdownDescription: "Map that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the instance.",
},
"backup_settings": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"enabled": schema.BoolAttribute{
Expand Down Expand Up @@ -90,22 +96,6 @@ func dataSourceSchema(isPlural bool) map[string]schema.Attribute {
Computed: true,
MarkdownDescription: "Human-readable label that indicates the current operating condition of this instance.",
},
"tags": schema.ListNestedAttribute{
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"key": schema.StringAttribute{
Computed: true,
MarkdownDescription: "Constant that defines the set of the tag. For example, `environment` in the `environment : production` tag.",
},
"value": schema.StringAttribute{
Computed: true,
MarkdownDescription: "Variable that belongs to the set of the tag. For example, `production` in the `environment : production` tag.",
},
},
},
Computed: true,
MarkdownDescription: "List that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the instance.",
},
"termination_protection_enabled": schema.BoolAttribute{
Computed: true,
MarkdownDescription: "Flag that indicates whether termination protection is enabled on the cluster. If set to `true`, MongoDB Cloud won't delete the cluster. If set to `false`, MongoDB Cloud will delete the cluster.",
Expand Down

0 comments on commit a58236e

Please sign in to comment.