Skip to content

Commit

Permalink
Merge pull request #35265 from hashicorp/b-aws_mq_broker.resourceUser…
Browse files Browse the repository at this point in the history
…Hash-panic

r/aws_mq_broker: Fix v5.32.0 regression panic `interface conversion: interface {} is *schema.Set, not []string`
  • Loading branch information
ewbankkit authored Jan 12, 2024
2 parents e62ee4e + bf79e49 commit 64c1d17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/35265.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_mq_broker: Fix `interface conversion: interface {} is *schema.Set, not []string` panic
```
4 changes: 2 additions & 2 deletions internal/service/mq/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ func resourceUserHash(v interface{}) int {
buf.WriteString("false-")
}
if g, ok := m["groups"]; ok {
buf.WriteString(fmt.Sprintf("%v-", g.([]string)))
buf.WriteString(fmt.Sprintf("%v-", g.(*schema.Set).List()))
}
if p, ok := m["password"]; ok {
buf.WriteString(fmt.Sprintf("%s-", p.(string)))
Expand Down Expand Up @@ -999,7 +999,7 @@ func flattenUsers(users []*types.User, cfgUsers []interface{}) *schema.Set {
m["replication_user"] = aws.ToBool(u.ReplicationUser)
}
if len(u.Groups) > 0 {
m["groups"] = u.Groups
m["groups"] = flex.FlattenStringValueSet(u.Groups)
}
out = append(out, m)
}
Expand Down

0 comments on commit 64c1d17

Please sign in to comment.