Skip to content
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

B MQ replication user fix #32454

Merged
merged 5 commits into from
Jul 11, 2023
Merged

Conversation

kband
Copy link
Contributor

@kband kband commented Jul 11, 2023

Description

Adds parameter to the MQ user update/creation API calls, so that new/existing AWS MQ resources don't fail to create/update.

I copied the pre-existing parameter console_access, and defaulted it to false.

Relations

Closes #32446

References

AWS recently announced support for cross-region data replication.

While this PR does not enable any replication functionality, will hopefully unblock updating of existing, non-replicated Amazon MQ brokers managed by Terraform.

Output from Acceptance Testing

$ make testacc PKG=mq
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/mq/... -v -count 1 -parallel 20   -timeout 180m
=== RUN   TestAccMQBrokerDataSource_basic
=== PAUSE TestAccMQBrokerDataSource_basic
=== RUN   TestAccMQBrokerInstanceTypeOfferingsDataSource_basic
=== PAUSE TestAccMQBrokerInstanceTypeOfferingsDataSource_basic
=== RUN   TestValidateBrokerName
=== PAUSE TestValidateBrokerName
=== RUN   TestBrokerPasswordValidation
=== PAUSE TestBrokerPasswordValidation
=== RUN   TestDiffUsers
=== PAUSE TestDiffUsers
=== RUN   TestAccMQBroker_basic
=== PAUSE TestAccMQBroker_basic
=== RUN   TestAccMQBroker_disappears
=== PAUSE TestAccMQBroker_disappears
=== RUN   TestAccMQBroker_tags
=== PAUSE TestAccMQBroker_tags
=== RUN   TestAccMQBroker_throughputOptimized
=== PAUSE TestAccMQBroker_throughputOptimized
=== RUN   TestAccMQBroker_AllFields_defaultVPC
=== PAUSE TestAccMQBroker_AllFields_defaultVPC
=== RUN   TestAccMQBroker_AllFields_customVPC
=== PAUSE TestAccMQBroker_AllFields_customVPC
=== RUN   TestAccMQBroker_EncryptionOptions_kmsKeyID
=== PAUSE TestAccMQBroker_EncryptionOptions_kmsKeyID
=== RUN   TestAccMQBroker_EncryptionOptions_managedKeyDisabled
=== PAUSE TestAccMQBroker_EncryptionOptions_managedKeyDisabled
=== RUN   TestAccMQBroker_EncryptionOptions_managedKeyEnabled
=== PAUSE TestAccMQBroker_EncryptionOptions_managedKeyEnabled
=== RUN   TestAccMQBroker_Update_users
=== PAUSE TestAccMQBroker_Update_users
=== RUN   TestAccMQBroker_Update_securityGroup
=== PAUSE TestAccMQBroker_Update_securityGroup
=== RUN   TestAccMQBroker_Update_engineVersion
=== PAUSE TestAccMQBroker_Update_engineVersion
=== RUN   TestAccMQBroker_Update_hostInstanceType
=== PAUSE TestAccMQBroker_Update_hostInstanceType
=== RUN   TestAccMQBroker_RabbitMQ_basic
=== PAUSE TestAccMQBroker_RabbitMQ_basic
=== RUN   TestAccMQBroker_RabbitMQ_logs
=== PAUSE TestAccMQBroker_RabbitMQ_logs
=== RUN   TestAccMQBroker_RabbitMQ_validationAuditLog
=== PAUSE TestAccMQBroker_RabbitMQ_validationAuditLog
=== RUN   TestAccMQBroker_RabbitMQ_cluster
=== PAUSE TestAccMQBroker_RabbitMQ_cluster
=== RUN   TestAccMQBroker_ldap
=== PAUSE TestAccMQBroker_ldap
=== RUN   TestAccMQConfiguration_basic
=== PAUSE TestAccMQConfiguration_basic
=== RUN   TestAccMQConfiguration_withData
=== PAUSE TestAccMQConfiguration_withData
=== RUN   TestAccMQConfiguration_withLdapData
=== PAUSE TestAccMQConfiguration_withLdapData
=== RUN   TestAccMQConfiguration_tags
=== PAUSE TestAccMQConfiguration_tags
=== RUN   TestCanonicalXML
=== PAUSE TestCanonicalXML
=== CONT  TestAccMQBrokerDataSource_basic
=== CONT  TestCanonicalXML
=== CONT  TestAccMQBroker_Update_users
=== CONT  TestAccMQBroker_tags
=== CONT  TestAccMQBroker_EncryptionOptions_managedKeyDisabled
=== CONT  TestAccMQBroker_disappears
=== CONT  TestValidateBrokerName
=== CONT  TestAccMQConfiguration_tags
=== CONT  TestAccMQConfiguration_withLdapData
=== CONT  TestBrokerPasswordValidation
=== CONT  TestAccMQBroker_EncryptionOptions_managedKeyEnabled
=== CONT  TestAccMQConfiguration_basic
=== RUN   TestCanonicalXML/Config_sample_from_MSDN
=== CONT  TestAccMQBroker_ldap
=== CONT  TestAccMQBroker_AllFields_defaultVPC
=== PAUSE TestCanonicalXML/Config_sample_from_MSDN
=== CONT  TestAccMQBroker_AllFields_customVPC
=== RUN   TestCanonicalXML/Config_sample_from_MSDN,_modified
=== PAUSE TestCanonicalXML/Config_sample_from_MSDN,_modified
=== RUN   TestCanonicalXML/Config_sample_from_MSDN,_flaw
=== PAUSE TestCanonicalXML/Config_sample_from_MSDN,_flaw
=== RUN   TestCanonicalXML/A_note
=== CONT  TestAccMQBroker_throughputOptimized
=== PAUSE TestCanonicalXML/A_note
=== CONT  TestAccMQBroker_RabbitMQ_cluster
=== CONT  TestDiffUsers
=== CONT  TestAccMQBrokerInstanceTypeOfferingsDataSource_basic
=== CONT  TestAccMQBroker_RabbitMQ_validationAuditLog
=== CONT  TestAccMQConfiguration_withData
=== CONT  TestAccMQBroker_basic
=== CONT  TestAccMQBroker_EncryptionOptions_kmsKeyID
--- PASS: TestValidateBrokerName (0.00s)
--- PASS: TestBrokerPasswordValidation (0.00s)
--- PASS: TestDiffUsers (0.00s)
=== CONT  TestAccMQBroker_Update_engineVersion
--- PASS: TestAccMQBrokerInstanceTypeOfferingsDataSource_basic (70.17s)
=== CONT  TestAccMQBroker_RabbitMQ_logs
--- PASS: TestAccMQConfiguration_withLdapData (84.66s)
=== CONT  TestAccMQBroker_RabbitMQ_basic
--- PASS: TestAccMQConfiguration_withData (84.83s)
=== CONT  TestAccMQBroker_Update_securityGroup
--- PASS: TestAccMQConfiguration_basic (116.20s)
=== CONT  TestAccMQBroker_Update_hostInstanceType
--- PASS: TestAccMQConfiguration_tags (138.01s)
=== CONT  TestCanonicalXML/Config_sample_from_MSDN
=== CONT  TestCanonicalXML/Config_sample_from_MSDN,_flaw
=== CONT  TestCanonicalXML/A_note
=== CONT  TestCanonicalXML/Config_sample_from_MSDN,_modified
--- PASS: TestCanonicalXML (0.00s)
    --- PASS: TestCanonicalXML/Config_sample_from_MSDN (0.00s)
    --- PASS: TestCanonicalXML/Config_sample_from_MSDN,_flaw (0.00s)
    --- PASS: TestCanonicalXML/A_note (0.00s)
    --- PASS: TestCanonicalXML/Config_sample_from_MSDN,_modified (0.00s)
--- PASS: TestAccMQBroker_throughputOptimized (901.02s)
--- PASS: TestAccMQBroker_RabbitMQ_basic (901.79s)
--- PASS: TestAccMQBroker_RabbitMQ_logs (918.63s)
--- PASS: TestAccMQBroker_EncryptionOptions_managedKeyEnabled (1024.98s)
--- PASS: TestAccMQBroker_disappears (1063.66s)
--- PASS: TestAccMQBroker_basic (1071.62s)
--- PASS: TestAccMQBrokerDataSource_basic (1081.86s)
--- PASS: TestAccMQBroker_EncryptionOptions_managedKeyDisabled (1085.15s)
--- PASS: TestAccMQBroker_tags (1087.15s)
--- PASS: TestAccMQBroker_RabbitMQ_validationAuditLog (1088.56s)
--- PASS: TestAccMQBroker_ldap (1129.74s)
--- PASS: TestAccMQBroker_EncryptionOptions_kmsKeyID (1149.12s)
--- PASS: TestAccMQBroker_RabbitMQ_cluster (1302.46s)
--- PASS: TestAccMQBroker_Update_engineVersion (1309.70s)
--- PASS: TestAccMQBroker_Update_securityGroup (1311.17s)
--- PASS: TestAccMQBroker_Update_users (1556.98s)
--- PASS: TestAccMQBroker_Update_hostInstanceType (1464.86s)
--- PASS: TestAccMQBroker_AllFields_customVPC (1798.04s)
--- PASS: TestAccMQBroker_AllFields_defaultVPC (1801.71s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/mq	1807.278s
...

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/mq Issues and PRs that pertain to the mq service. size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. labels Jul 11, 2023
@kband kband marked this pull request as ready for review July 11, 2023 11:02
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome @kband 👋

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 CONTRIBUTOR 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! 😃

@AdamTylerLynch AdamTylerLynch self-requested a review July 11, 2023 13:49
Copy link
Collaborator

@AdamTylerLynch AdamTylerLynch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@jar-b jar-b removed the needs-triage Waiting for first response or review from a maintainer. label Jul 11, 2023
@johnsonaj johnsonaj added the bug Addresses a defect in current functionality. label Jul 11, 2023
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Jul 11, 2023
Copy link
Contributor

@johnsonaj johnsonaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

$ go test -v ./internal/service/mq/... -run='TestDiffUsers' -count=1

--- PASS: TestDiffUsers (0.00s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/mq	3.179s
$ make testacc PKG=mq TESTARGS='-run=TestAccMQBroker_'
         
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/mq/... -v -count 1 -parallel 20  -run=TestAccMQBroker_ -timeout 180m
--- PASS: TestAccMQBroker_throughputOptimized (847.81s)
--- PASS: TestAccMQBroker_RabbitMQ_validationAuditLog (875.36s)
--- PASS: TestAccMQBroker_RabbitMQ_basic (880.62s)
--- PASS: TestAccMQBroker_EncryptionOptions_managedKeyDisabled (964.81s)
--- PASS: TestAccMQBroker_EncryptionOptions_managedKeyEnabled (973.29s)
--- PASS: TestAccMQBroker_RabbitMQ_logs (978.09s)
--- PASS: TestAccMQBroker_tags (991.35s)
--- PASS: TestAccMQBroker_ldap (1020.26s)
--- PASS: TestAccMQBroker_disappears (1029.19s)
--- PASS: TestAccMQBroker_EncryptionOptions_kmsKeyID (1044.31s)
--- PASS: TestAccMQBroker_basic (1045.38s)
--- PASS: TestAccMQBroker_RabbitMQ_cluster (1111.19s)
--- PASS: TestAccMQBroker_Update_engineVersion (1206.89s)
--- PASS: TestAccMQBroker_Update_securityGroup (1324.05s)
--- PASS: TestAccMQBroker_Update_users (1384.51s)
--- PASS: TestAccMQBroker_Update_hostInstanceType (1556.84s)
--- PASS: TestAccMQBroker_AllFields_customVPC (1684.88s)
--- PASS: TestAccMQBroker_AllFields_defaultVPC (1875.86s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/mq	1879.171s

@johnsonaj
Copy link
Contributor

@kband thank you for the contribution! 🎉

@johnsonaj johnsonaj merged commit a113ad2 into hashicorp:main Jul 11, 2023
@github-actions github-actions bot added this to the v5.8.0 milestone Jul 11, 2023
@github-actions
Copy link

This functionality has been released in v5.8.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. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. documentation Introduces or discusses updates to documentation. service/mq Issues and PRs that pertain to the mq service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: aws_mq_broker update fails with BadRequestException
4 participants