When downgrading the instance type (host_instance_type) to mq.t3.micro in aws_mq_broker when engine_type is RabbitMQ, CustomizeDiff should force a new resource (probably via ForceNewIfChange).
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.3.9
AWS Provider Version
4.55.0
Affected Resource(s)
aws_mq_broker
Expected Behavior
When downgrading the instance type (
host_instance_type
) tomq.t3.micro
inaws_mq_broker
whenengine_type
isRabbitMQ
,CustomizeDiff
should force a new resource (probably viaForceNewIfChange
).https://github.com/hashicorp/terraform-provider-aws/blob/ae683662502d49e73caf3a8d01fb4689ab400592/internal/service/mq/broker.go#L335-L350
Downgrading
hostInstanceType
tomq.t3.micro
is not allowed by the AMQ API.https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/rmq-broker-instance-types.html
Actual Behavior
The Provider does not catch said condition, and the UpdateBroker request is sent to the AWS REST API, where it is rejected:
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
Would you like to implement a fix?
None