Skip to content

Commit e9c69ed

Browse files
committed
chore: remove computed from locality schemas
1 parent d3c4db1 commit e9c69ed

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

internal/locality/regional/schemas.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,10 @@ func Schema() *schema.Schema {
3232
Optional: true,
3333
ForceNew: true,
3434
ValidateDiagFunc: locality.ValidateStringInSliceWithWarning(allRegions(), "region"),
35+
DiffSuppressFunc: suppressSDKNullAssignment,
3536
}
3637
}
38+
39+
func suppressSDKNullAssignment(k, old, new string, d *schema.ResourceData) bool {
40+
return new == "" && old != ""
41+
}

internal/locality/zonal/schemas.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,10 @@ func Schema() *schema.Schema {
3232
Optional: true,
3333
ForceNew: true,
3434
ValidateDiagFunc: locality.ValidateStringInSliceWithWarning(AllZones(), "zone"),
35+
DiffSuppressFunc: suppressSDKNullAssignment,
3536
}
3637
}
38+
39+
func suppressSDKNullAssignment(k, old, new string, d *schema.ResourceData) bool {
40+
return new == "" && old != ""
41+
}

0 commit comments

Comments
 (0)