Skip to content

Commit 3e9c97f

Browse files
committed
Makes deletion_protection_enabled actually optional
1 parent 5e46509 commit 3e9c97f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/service/dsql/cluster.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"github.com/hashicorp/terraform-plugin-framework/path"
2020
"github.com/hashicorp/terraform-plugin-framework/resource"
2121
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
22+
"github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault"
2223
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
2324
"github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier"
2425
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
@@ -65,6 +66,8 @@ func (r *clusterResource) Schema(ctx context.Context, request resource.SchemaReq
6566
names.AttrARN: framework.ARNAttributeComputedOnly(),
6667
"deletion_protection_enabled": schema.BoolAttribute{
6768
Optional: true,
69+
Computed: true,
70+
Default: booldefault.StaticBool(false),
6871
},
6972
"encryption_details": framework.ResourceComputedListOfObjectsAttribute[encryptionDetailsModel](ctx),
7073
names.AttrIdentifier: framework.IDAttribute(),

0 commit comments

Comments
 (0)