Skip to content

Commit 64c1d17

Browse files
authored
Merge pull request #35265 from hashicorp/b-aws_mq_broker.resourceUserHash-panic
r/aws_mq_broker: Fix v5.32.0 regression panic `interface conversion: interface {} is *schema.Set, not []string`
2 parents e62ee4e + bf79e49 commit 64c1d17

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.changelog/35265.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/aws_mq_broker: Fix `interface conversion: interface {} is *schema.Set, not []string` panic
3+
```

internal/service/mq/broker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ func resourceUserHash(v interface{}) int {
746746
buf.WriteString("false-")
747747
}
748748
if g, ok := m["groups"]; ok {
749-
buf.WriteString(fmt.Sprintf("%v-", g.([]string)))
749+
buf.WriteString(fmt.Sprintf("%v-", g.(*schema.Set).List()))
750750
}
751751
if p, ok := m["password"]; ok {
752752
buf.WriteString(fmt.Sprintf("%s-", p.(string)))
@@ -999,7 +999,7 @@ func flattenUsers(users []*types.User, cfgUsers []interface{}) *schema.Set {
999999
m["replication_user"] = aws.ToBool(u.ReplicationUser)
10001000
}
10011001
if len(u.Groups) > 0 {
1002-
m["groups"] = u.Groups
1002+
m["groups"] = flex.FlattenStringValueSet(u.Groups)
10031003
}
10041004
out = append(out, m)
10051005
}

0 commit comments

Comments
 (0)