AmazonMQ now support RabbitMQ as an engine. This is the first time AWS adds another type of engine to AMQ service. Looking at the Go package - the changes are minimal.
resource "aws_mq_broker" "example" {
broker_name = "example"
engine_type = "RabbitMQ"
engine_version = "3.8.6"
host_instance_type = "mq.t2.micro"
security_groups = [aws_security_group.test.id]
user {
username = "ExampleUser"
password = "MindTheGap"
}
}
I'm going to take crack at this today
blocked by #16021
AWS has some issue with their MQ API - it does not return list of users in DescribeBroker
's payload if it's an AMQ instance with RabbitMQ engine.
From my support convo with AWS, It looks like for RabbitMQ engine type, AWS is not planning on sending the users list in the DescribeBroker API call:
The issue that I am getting is that if the users list does not come back - terraform will assume it needs to add them again, because the mq broker state has that user list empty (its failing the tests, saying that nothing was changed, but a plan came back with an update). This only happens with RabbitMQ, It does return on the user list if the engine type is ApacheMQ.
@ewbankkit I need some advice on this resource.
How should I proceed?
Is there a way to ignore that user list? (based on the engine type)
Should username and password be only be effective on broker creation? (based on the engine type)
Requires AWS SDK v1.35.21:
- #16021
https://github.com/hashicorp/terraform-provider-aws/pull/16085 is merged.
Waiting, waiting, waiting ... 馃憤
I am happy to finish ASAP, but I am blocked by my question. If anyone can help me with my question here https://github.com/hashicorp/terraform-provider-aws/pull/16108#issuecomment-724429336
@yardensachs thanks for getting this done so quickly, hopefully someone can help you get unblocked ASAP.
There are a couple services which have similar issues. For example, DMS replication_task_settings
contains read-only properties that need to be ignored, as re-submitting existing state as-is doesn't work; see: https://github.com/terraform-providers/terraform-provider-aws/pull/13476.
I'd argue that it would be better to unblock the feature and work to improve in the future, and note to folks that they should do something like the following to ignore the limitation of the API (if it's the change detection here that's the issue):
lifecycle {
ignore_changes = [user]
}
I've been eagerly awaiting an AWS managed drop-in RMQ solution for years, so if this isn't OK with the community, I'll be fine waiting another little bit.
Thank you for your contribution!
@ienders I was able to figure it out without help!
Hopefully I will get #16108 reviewed quickly, I have seen PRs take long (and short) time til the team had time to review.
Most helpful comment
@ienders I was able to figure it out without help!
Hopefully I will get #16108 reviewed quickly, I have seen PRs take long (and short) time til the team had time to review.