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

[Bug]: modifying the configuration of an ActiveMQ broker running 5.18 fails with BadRequestException: Broker engine version [5.18.4] is invalid for broker engine type [ACTIVEMQ] #38708

Closed
paulswartz opened this issue Aug 6, 2024 · 5 comments · Fixed by #39024
Labels
bug Addresses a defect in current functionality. service/mq Issues and PRs that pertain to the mq service.
Milestone

Comments

@paulswartz
Copy link

paulswartz commented Aug 6, 2024

Terraform Core Version

1.4.2, OpenTofu 1.6.2

AWS Provider Version

5.61.0

Affected Resource(s)

  • aws_mq_broker
  • aws_mq_configuration

Expected Behavior

The plan from Terraform does not modify the engine_version, only the configuration.

Actual Behavior

The engine version is configured in Terraform as "5.18", but reported by AWS as "5.18.4". My assumption is that the provider tries to re-send the reported version back to AWS, which then fails.

Relevant Error/Panic Output Snippet

Error: updating MQ Broker (XXX) configuration: BadRequestException: Broker engine version [5.18.4] is invalid for broker engine type [ACTIVEMQ]. Valid values: [5.18, 5.17.6, 5.16.7, 5.15.16].│ {│   RespMetadata: {│     StatusCode: 400,│     RequestID: "cffc2472-2dcf-4062-a2e9-2ded71335611"│   },│   ErrorAttribute: "engineVersion",│   Message_: "Broker engine version [5.18.4] is invalid for broker engine type [ACTIVEMQ]. Valid values: [5.18, 5.17.6, 5.16.7, 5.15.16]."│ }│ │   with module.mq_broker.aws_mq_broker.default,│   on ../modules/ctd-activemq/mq.tf line 11, in resource "aws_mq_broker" "default":│   11: resource "aws_mq_broker" "default" {│ ╵

Terraform Configuration Files

resource "aws_security_group" "example" {
  name = "example"

  ingress {
    description      = "MQTT over TLS"
    from_port        = 8883
    to_port          = 8883
    protocol         = "tcp"
    cidr_blocks      = ["0.0.0.0/0"]
    ipv6_cidr_blocks = ["::/0"]
  }

  egress {
    from_port        = 0
    to_port          = 0
    protocol         = "-1"
    cidr_blocks      = ["0.0.0.0/0"]
    ipv6_cidr_blocks = ["::/0"]
  }
}

# resource "aws_mq_configuration" "example" {
#   description    = "Example Configuration"
#   name           = "example"
#   engine_type    = "ActiveMQ"
#   engine_version = "5.18"

#   data = <<DATA
# <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
# <broker xmlns="http://activemq.apache.org/schema/core">
# </broker>
# DATA
# }

resource "aws_mq_broker" "example" {
  broker_name = "example"

  engine_type                = "ActiveMQ"
  engine_version             = "5.18"
  host_instance_type         = "mq.t3.micro"
  apply_immediately          = true
  auto_minor_version_upgrade = true
  security_groups            = [aws_security_group.example.id]

  # configuration {
  #   id       = aws_mq_configuration.example.id
  #   revision = aws_mq_configuration.example.latest_revision
  # }

  lifecycle {
    ignore_changes = [engine_version]
  }

  user {
    username = "ExampleUser"
    password = "LongPasswordString"
  }
}

Steps to Reproduce

  1. Run an initial apply
  2. Un-comment the aws_mq_configuration block and the configuration in aws_mq_broker
  3. Run another apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No

@paulswartz paulswartz added the bug Addresses a defect in current functionality. label Aug 6, 2024
@github-actions github-actions bot added service/mq Issues and PRs that pertain to the mq service. service/vpc Issues and PRs that pertain to the vpc service. labels Aug 6, 2024
Copy link

github-actions bot commented Aug 6, 2024

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Aug 6, 2024
@justinretzolk justinretzolk removed needs-triage Waiting for first response or review from a maintainer. service/vpc Issues and PRs that pertain to the vpc service. labels Aug 14, 2024
@el-chazmo
Copy link

el-chazmo commented Aug 20, 2024

This issue is present with aws v5.63 | checked today.
EDIT: This issue wasn't present when previously running with aws v5.59 | but when testing today, the issue is there.
I assume this is actually an AWS API issue, rather than a provider issue. I have opened a case with AWS and will report back

Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.68.0 milestone Sep 13, 2024
Copy link

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

Copy link

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 have found a problem that seems similar to this, 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 Oct 22, 2024
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. service/mq Issues and PRs that pertain to the mq service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants