Terraform-provider-aws: Support for RabbitMQ in AmazonMQ

Created on 4 Nov 2020  路  11Comments  路  Source: hashicorp/terraform-provider-aws

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

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.

New or Affected Resource(s)

  • aws_mq_broker

Potential Terraform Configuration

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"
  }
}

References

enhancement servicmq

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.

All 11 comments

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:
Screen Shot 2020-11-06 at 7 11 04 AM

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)

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.

Was this page helpful?
0 / 5 - 0 ratings