Skip to content

aws_mq_broker change user block to optional#46883

Open
joshRooz wants to merge 8 commits intohashicorp:mainfrom
joshRooz:f-mq-broker-user-block-optional
Open

aws_mq_broker change user block to optional#46883
joshRooz wants to merge 8 commits intohashicorp:mainfrom
joshRooz:f-mq-broker-user-block-optional

Conversation

@joshRooz
Copy link

@joshRooz joshRooz commented Mar 12, 2026

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

None

Description

Makes user block an optional attribute for instances where the authentication method is LDAP (ActiveMQ) or config managed (RabbitMQ).

Additionally, the PR includes acceptance test changes addressing unrelated failures that could have been masking regressions.

  1. Invalid broker engine versions.
    Invalid broker engine version [3.11.20] for RABBITMQ (valid: 4.2, 3.13)
    Invalid broker engine version [5.17.6] for ACTIVEMQ (valid: 5.19, 5.18)

  2. autoMinorVersionUpgrade must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.
    RabbitMQ 3.13 requires autoMinorVersionUpgrade set to true
    ActiveMQ 5.18 requires autoMinorVersionUpgrade set to true

Relations

Closes #46882

References

See related issue

Output from Acceptance Testing

Important

Remaining failures all target RabbitMQ and are related to #46061. I reverted diff after updating the acceptance tests and confirmed the same "refresh plan was not empty" errors were present.

All failed tests match this example. Removed from output below for readability.
   broker_test.go:1336: Step 1/2 error: After applying this test step, the refresh plan was not empty.
       stdout
       
       
       Terraform used the selected providers to generate the following execution
       plan. Resource actions are indicated with the following symbols:
         ~ update in-place
       
       Terraform will perform the following actions:
       
         # aws_mq_broker.test will be updated in-place
         ~ resource "aws_mq_broker" "test" {
               id                            = "b-002f75bc-9aa9-4763-991c-0fe3801ab3ca"
               tags                          = {}
               # (18 unchanged attributes hidden)
       
               # (4 unchanged blocks hidden)
           }
       
       Plan: 0 to add, 1 to change, 0 to destroy.

% make testacc TESTS='^TestAccMQBroker_' PKG=mq
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-mq-broker-user-block-optional 🌿...
TF_ACC=1 go1.25.8 test ./internal/service/mq/... -v -count 1 -parallel 20 -run='^TestAccMQBroker_'  -timeout 360m -vet=off
2026/03/12 19:44:57 Creating Terraform AWS Provider (SDKv2-style)...
2026/03/12 19:44:57 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccMQBroker_basic
=== PAUSE TestAccMQBroker_basic
=== RUN   TestAccMQBroker_normalizedEngineVersion
=== PAUSE TestAccMQBroker_normalizedEngineVersion
=== 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_hostInstanceType
=== PAUSE TestAccMQBroker_Update_hostInstanceType
=== RUN   TestAccMQBroker_RabbitMQ_basic
=== PAUSE TestAccMQBroker_RabbitMQ_basic
=== RUN   TestAccMQBroker_RabbitMQ_autoMinorVersionUpgrade
=== PAUSE TestAccMQBroker_RabbitMQ_autoMinorVersionUpgrade
=== RUN   TestAccMQBroker_RabbitMQ_normalizedEngineVersion
=== PAUSE TestAccMQBroker_RabbitMQ_normalizedEngineVersion
=== RUN   TestAccMQBroker_RabbitMQ_config
=== PAUSE TestAccMQBroker_RabbitMQ_config
=== RUN   TestAccMQBroker_RabbitMQ_configNoUserBlock
=== PAUSE TestAccMQBroker_RabbitMQ_configNoUserBlock
=== 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   TestAccMQBroker_dataReplicationMode
=== PAUSE TestAccMQBroker_dataReplicationMode
=== CONT  TestAccMQBroker_basic
=== CONT  TestAccMQBroker_ldap
=== CONT  TestAccMQBroker_RabbitMQ_logs
=== CONT  TestAccMQBroker_EncryptionOptions_kmsKeyID
=== CONT  TestAccMQBroker_dataReplicationMode
=== CONT  TestAccMQBroker_RabbitMQ_validationAuditLog
=== CONT  TestAccMQBroker_RabbitMQ_configNoUserBlock
=== CONT  TestAccMQBroker_RabbitMQ_config
=== CONT  TestAccMQBroker_RabbitMQ_normalizedEngineVersion
=== CONT  TestAccMQBroker_RabbitMQ_autoMinorVersionUpgrade
=== CONT  TestAccMQBroker_RabbitMQ_basic
=== CONT  TestAccMQBroker_RabbitMQ_cluster
=== CONT  TestAccMQBroker_AllFields_customVPC
=== CONT  TestAccMQBroker_Update_securityGroup
=== CONT  TestAccMQBroker_Update_users
=== CONT  TestAccMQBroker_EncryptionOptions_managedKeyEnabled
=== CONT  TestAccMQBroker_EncryptionOptions_managedKeyDisabled
=== CONT  TestAccMQBroker_tags
=== CONT  TestAccMQBroker_AllFields_defaultVPC
=== CONT  TestAccMQBroker_Update_hostInstanceType
=== NAME  TestAccMQBroker_RabbitMQ_validationAuditLog
--- FAIL: TestAccMQBroker_RabbitMQ_validationAuditLog (647.41s)
=== CONT  TestAccMQBroker_throughputOptimized
=== NAME  TestAccMQBroker_RabbitMQ_logs
=== NAME  TestAccMQBroker_RabbitMQ_autoMinorVersionUpgrade
=== NAME  TestAccMQBroker_RabbitMQ_cluster
--- PASS: TestAccMQBroker_RabbitMQ_configNoUserBlock (710.59s)
=== CONT  TestAccMQBroker_disappears
=== NAME  TestAccMQBroker_RabbitMQ_basic
=== NAME  TestAccMQBroker_RabbitMQ_config
--- FAIL: TestAccMQBroker_RabbitMQ_cluster (734.01s)
=== CONT  TestAccMQBroker_normalizedEngineVersion
--- FAIL: TestAccMQBroker_RabbitMQ_autoMinorVersionUpgrade (749.02s)
--- FAIL: TestAccMQBroker_RabbitMQ_logs (754.16s)
--- FAIL: TestAccMQBroker_RabbitMQ_basic (777.47s)
=== NAME  TestAccMQBroker_RabbitMQ_normalizedEngineVersion
--- FAIL: TestAccMQBroker_RabbitMQ_config (804.98s)
--- FAIL: TestAccMQBroker_RabbitMQ_normalizedEngineVersion (881.95s)
--- PASS: TestAccMQBroker_EncryptionOptions_managedKeyEnabled (941.28s)
--- PASS: TestAccMQBroker_tags (1019.19s)
--- PASS: TestAccMQBroker_basic (1020.23s)
--- PASS: TestAccMQBroker_EncryptionOptions_managedKeyDisabled (1029.69s)
--- PASS: TestAccMQBroker_EncryptionOptions_kmsKeyID (1035.59s)
--- PASS: TestAccMQBroker_Update_hostInstanceType (1041.54s)
--- PASS: TestAccMQBroker_Update_securityGroup (1210.75s)
--- PASS: TestAccMQBroker_ldap (1239.98s)
--- PASS: TestAccMQBroker_Update_users (1392.07s)
--- PASS: TestAccMQBroker_throughputOptimized (898.79s)
--- PASS: TestAccMQBroker_AllFields_defaultVPC (1633.26s)
--- PASS: TestAccMQBroker_AllFields_customVPC (1713.80s)
--- PASS: TestAccMQBroker_normalizedEngineVersion (994.77s)
--- PASS: TestAccMQBroker_disappears (1044.64s)
--- PASS: TestAccMQBroker_dataReplicationMode (2254.42s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/mq	2261.611s
FAIL
make: *** [testacc] Error 1

@joshRooz joshRooz requested a review from a team as a code owner March 12, 2026 05:36
@github-actions
Copy link
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 2026

✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/mq Issues and PRs that pertain to the mq service. size/L Managed by automation to categorize the size of a PR. labels Mar 12, 2026
@dosubot dosubot bot added the enhancement Requests to existing resources that expand the functionality or scope. label Mar 12, 2026
@github-actions github-actions bot added the size/XL Managed by automation to categorize the size of a PR. label Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. service/mq Issues and PRs that pertain to the mq service. size/L Managed by automation to categorize the size of a PR. size/XL 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.

aws_mq_broker change user block to optional

1 participant