-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for RabbitMQ in AmazonMQ #16030
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 |
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. |
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 #16108 (comment) |
@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 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):
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! |
Some of you might be thinking that you can work around this by creating a broker in CloudFormation temporarily and referencing it with a This crashes as (I think) the result from the AWS API is slightly different to what the The only way to make this work while we wait is to create the broker using the console or the CLI and adding variables to your Terraform configuration or SSM parameters. So, hopefully I can save others some time here if you're thinking along the same lines as me. |
Any update on this one? |
1 similar comment
Any update on this one? |
+1 |
I don't know when this will be merged. I can't imagine the amount of work the maintainers have, and the speed at which AWS is now releasing changes - I am sure its crazy. Once it gets reviewed I will update the PR. |
Similar to what @steverukuts describes, the viable workaround is to set up the broker via This is obviously a hack but well, it works. Also, one could hide the details in a terraform module so variables/outputs will not change while migrating to a native resource once the respective PR is merged. https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack |
Ended up doing this as a temporary solution baed on that idea: locals {
template_body = {
"Parameters" = {},
"Resources" = {
"RabbitBroker" = {
"Type" = "AWS::AmazonMQ::Broker",
"Properties" = {
"AuthenticationStrategy" = "simple",
"AutoMinorVersionUpgrade" = "true",
"BrokerName" = "name",
"DeploymentMode" = "SINGLE_INSTANCE",
"EngineType" = "RabbitMQ",
"EngineVersion" = "3.8.6",
"HostInstanceType" = "mq.t3.micro",
"Logs" = {
"General" = "false"
},
"MaintenanceWindowStartTime" = {
"DayOfWeek" = "WEDNESDAY",
"TimeOfDay" = "00:00",
"TimeZone" = "UTC"
},
"PubliclyAccessible" = "false",
"SecurityGroups" = [""],
"StorageType" = "ebs",
"SubnetIds" = [""],
"Tags" = [
{
"Key" = "key",
"Value" = "value"
}
],
"Users" = [
{
"Username" = "username",
"Password" = "password",
},
]
}
}
}
"Outputs" = {
"Endpoints" = {
"Value" = {
"Fn::Select" = [
0,
{
"Fn::GetAtt" = [
"RabbitBroker",
"AmqpEndpoints"
]
}
]
},
"Description" = "RabbitBroker AmqpEndpoints"
}
}
}
}
resource "aws_cloudformation_stack" "rabbitmq" {
name = "rabbitmq-stack"
template_body = jsonencode(local.template_body)
}
output "endpoint" {
value = aws_cloudformation_stack.rabbitmq.outputs["Endpoints"]
description = "RabbitMQ endpoint"
}
|
@yardensachs what's your thought on how cleanly this will convert once the provider is capable of managing it? i was going to manually create things in the console and then import once capable, but this seems better as the interim step. |
@mrtristan Good question, you can ask CF to keep the resources, even if the CF stack is delete AFAIK: And then you can just import the broker to terraform. |
Any one looking at the PR ? |
This has been released in version 3.32.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
Native RabbitMQ works in 3.32, thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
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)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: