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

New RabbitMQ support in aws_mq_broker fails to create resource with general log enabled #18107

Closed
trevorrea opened this issue Mar 15, 2021 · 2 comments
Labels
bug Addresses a defect in current functionality. service/mq Issues and PRs that pertain to the mq service.

Comments

@trevorrea
Copy link
Contributor

trevorrea commented Mar 15, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Affected Resource(s)

  • aws_mq_broker

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "aws_mq_broker" "hubs" {
  broker_name                = local.resource_prefix
  apply_immediately          = var.hubs_mq_apply_immediately
  auto_minor_version_upgrade = var.hubs_mq_auto_minor_version_upgrade
  deployment_mode            = "SINGLE_INSTANCE"
  engine_type                = "RabbitMQ"
  engine_version             = "3.8.6"
  host_instance_type         = "mq.t3.micro"
  security_groups            = [aws_security_group.hubs_mq.id]
  subnet_ids                 = [module.vpc.private_subnets[0]
  tags                       = local.common_tags
  logs {
    general = true
  }
  maintenance_window_start_time {
    day_of_week = var.hubs_mq_maintenance_day_of_week
    time_of_day = var.hubs_mq_maintenance_time_of_day
    time_zone   = var.hubs_mq_maintenance_timezone
  }
  user {
    username = var.hubs_mq_username
    password = var.hubs_mq_password
  }
  lifecycle {
    prevent_destroy = true
  }
}
resource "aws_mq_broker" "hubs" {
  broker_name                = local.resource_prefix
  apply_immediately          = var.hubs_mq_apply_immediately
  auto_minor_version_upgrade = var.hubs_mq_auto_minor_version_upgrade
  deployment_mode            = "SINGLE_INSTANCE"
  engine_type                = "RabbitMQ"
  engine_version             = "3.8.6"
  host_instance_type         = "mq.t3.micro"
  security_groups            = [aws_security_group.hubs_mq.id]
  subnet_ids                 = [module.vpc.private_subnets[0]
  tags                       = local.common_tags
  logs {
    audit  = false
    general = true
  }
  maintenance_window_start_time {
    day_of_week = var.hubs_mq_maintenance_day_of_week
    time_of_day = var.hubs_mq_maintenance_time_of_day
    time_zone   = var.hubs_mq_maintenance_timezone
  }
  user {
    username = var.hubs_mq_username
    password = var.hubs_mq_password
  }
  lifecycle {
    prevent_destroy = true
  }
}

Debug Output

Panic Output

Expected Behavior

Terraform should have created the Amazon MQ broker with general logging enabled to CloudWatch.

Actual Behavior

Error message received

Error: BadRequestException: Audit logging is not supported for RabbitMQ brokers.
{
  RespMetadata: {
    StatusCode: 400,
    RequestID: "aac00a9c-7a8c-463d-9d2a-6bd9763c43c0"
  },
  ErrorAttribute: "logs.audit",
  Message_: "Audit logging is not supported for RabbitMQ brokers."
}

Steps to Reproduce

Create a RabbitMQ broker with general logging enabled. Note - adding audit = false results in the same error.

Important Factoids

N/A

References

Tagging @yardensachs - thanks so much for adding support for RabbitMQ - not sure if you can easily reproduce this but hopefully you should be able to!

@ghost ghost added the service/mq Issues and PRs that pertain to the mq service. label Mar 15, 2021
@anGie44
Copy link
Contributor

anGie44 commented Mar 16, 2021

Hi @trevorrea , thank you for raising this issue. It happens to duplicate #18067 , so I'm going to close this issue but please refer to the other issue for updates.

@anGie44 anGie44 closed this as completed Mar 16, 2021
@anGie44 anGie44 added the bug Addresses a defect in current functionality. label Mar 16, 2021
@ghost
Copy link

ghost commented Apr 15, 2021

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!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 15, 2021
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

No branches or pull requests

2 participants