Skip to content

aws_mq_broker incorrect order of endpoints due to the new feature (prometheus monitoring) #47764

@avoidik

Description

@avoidik

Terraform and AWS Provider Version

$ terraform --version
Terraform v1.15.1
on darwin_arm64

Affected Resource(s) or Data Source(s)

  • aws_mq_broker

Expected Behavior

Correct order of endpoints

Actual Behavior

After AWS introduced Prometheus metrics support for Amazon MQ RabbitMQ (release notes), the broker endpoints list returned by the API now has the Prometheus metrics URL as the first entry. This breaks the Terraform AWS provider because it relies on positional index to resolve endpoints — what was previously endpoints[0] (AMQP) is now displaced.

Relevant Error/Panic Output

N/A

Sample Terraform Configuration

N/A

Steps to Reproduce

  1. Deploy MQ broker by following https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/mq_broker.html

Debug Logging

N/A

GenAI / LLM Assisted Development

N/A

Important Facts and References

Before maintenance:

$ aws mq describe-broker --query BrokerInstances[].Endpoints --broker-id abc
[
    [
        "amqps://url.on.aws:5671"
    ]
]

After maintenance:

$ aws mq describe-broker --query BrokerInstances[].Endpoints --broker-id abc
[
    [
        "https://url.on.aws:16001",
        "amqps://url.on.aws:5671"
    ]
]

Relevant issue #13786

Would you like to implement a fix?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAddresses a defect in current functionality.service/mqIssues and PRs that pertain to the mq service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions