Skip to content

Commit dd9c951

Browse files
committed
fix: trying custom hash for set to prevent drift, as only name should identify region type
1 parent c489f09 commit dd9c951

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

provider/resource_rediscloud_active_active_database.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ func resourceRedisCloudActiveActiveDatabase() *schema.Resource {
214214
Description: "Region-specific configuration parameters to override the global configuration",
215215
Type: schema.TypeSet,
216216
Optional: true,
217+
Set: func(v interface{}) int {
218+
m := v.(map[string]interface{})
219+
// Hash only by region name to maintain stable element identity
220+
// This prevents TypeSet from treating elements with different fields as different elements
221+
return schema.HashString(m["name"].(string))
222+
},
217223
Elem: &schema.Resource{
218224
Schema: map[string]*schema.Schema{
219225
"name": {

0 commit comments

Comments
 (0)