-
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
[WIP] Add a new EngineTypeRabbitmq AWS messaging engine type #16751
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @bonza 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
Hi @bonza - note that my PR at https://github.com/hashicorp/terraform-provider-aws/pull/16732/files#diff-c8149cac5dcb3d1ae9b02795a3824d9ac8ae1e87fedce8529dede6d884987665R102 also covers this but in a slightly different way. From a quick look at the Getting Started Guide and the API docs it looks like it might just be as simple as specifying an |
Thanks, @mattburgess ! |
For testing, I'd suggest you start by copying the current "basic" test from https://github.com/hashicorp/terraform-provider-aws/blob/master/aws/resource_aws_mq_broker_test.go#L236-L301 and call it something like terraform-provider-aws/aws/resource_aws_mq_broker_test.go Lines 897 to 920 in 4ca17d1
testAccMqBrokerConfig_rabbitmq . Change the parameters there to match what is required for a basic RabbitMQ-based broker then change your copy of the basic test case so that it calls that function (i.e. your equivalent of line 248).
The documentation at https://github.com/hashicorp/terraform-provider-aws/blob/master/docs/contributing/running-and-writing-acceptance-tests.md will walk you through how to run those tests against your branch-built version of the provider. If you run it at this stage, it will fail because of the test assertions (the You'll also want to update the documentation at https://github.com/hashicorp/terraform-provider-aws/blob/4ca17d1f5bc5f1c5bf21b0ab6ee8ee79ccb7701e/website/docs/r/mq_broker.html.markdown to mention that Hope this helps! |
@mattburgess , it seems like it is not that easy as I was hoping. The issue I'm trying to fix is there is no such thing as configuration for RabbitMQ engine, so acceptance test is failing on a call of
Unfortunately, I'm not a Go expert, I'm a total noob :) Do you know any resource code I can take a look to find a way how to deal with similar differences between resource types? |
c766f15
to
a00a9b3
Compare
Have no idea what is going on here 😢 |
This took a bit of digging! https://github.com/aws/aws-sdk-go/blob/v1.36.13/service/mq/api.go#L5751 - |
Well, that seems to be a bit of a false alarm. @bonza - if you run the test like this: You'll see a
Note how the |
Yup, sure enough, this looks to be a bug in the AWS API: Given an
The cluster can be created using: And then described using: This shows:
|
aws/aws-sdk-go#3625 is interesting! Looks like the current thinking is that |
Thanks a lot, @mattburgess! It would take days for me to get through all of this |
@bonza - I've raised aws/aws-sdk#32 seeking confirmation of if this is indeed expected behaviour. There are ways and means of suppressing that diff if that's the case but I worry about how this resource should handle it; we'll probably want to add some extra tests to ensure we do the right thing if a user updates the |
I believe that this functionality has been added with #16108 and may no longer be necessary. If you have objections, please respond in this thread. Otherwise, this will be closed at a future time. |
Thanks a lot for you work, @YakDriver ! |
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! |
See https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/getting-started-rabbitmq.html
Not sure what else needs to be changed
Community Note
Relates OR Closes #0000
Release note for CHANGELOG:
Output from acceptance testing: