Problem
Terraform AWS Provider version 5.32.0 is in use and the following panic occurs during a plan or apply that deploys configuration of a resource named aws_mq_broker.
Error: The terraform-provider-aws_v5.32.0_x5 plugin crashed!
panic: interface conversion: interface {} is *schema.Set, not []string
goroutine 892 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/mq.resourceUserHash({0xe26bac0?, 0xc001e2fef0})
...terraform-providers/terraform-provider-aws/internal/service/mq/broker.go:749 +0x325
Prerequisites
- AWS Provider version 5.32.0 is used.
Cause
-
This is a known issue with AWS Provider version 5.32.0.
Workaround
- Pin the AWS provider backwards to the last known working version; ie. v5.31.0.
Solution(s)
Upgrade to AWS Provider version 5.32.1 or higher.
Instructions on setting a provider constraint may be found here: https://developer.hashicorp.com/terraform/language/expressions/version-constraints
If upgrading, a recommended approach would be to pin the provider version to a family of versions such as the 5.32.X series as shown below:
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version ~> "5.32.0"
}
}
}
Outcome
Provisioning AWS infrastructure using Terraform will proceed like normal.
Additional Links
https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md#5321-january-12-2024