Skip to content

Commit

Permalink
chore: set auto_minor_version_upgrade to true in amazon mq (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
aneojgurhem authored Jan 22, 2025
2 parents 68d734b + 7c687e2 commit e634a36
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions storage/aws/mq/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,18 @@ resource "random_password" "password" {
}

resource "aws_mq_broker" "mq" {
broker_name = var.name
engine_type = var.engine_type
engine_version = var.engine_version
host_instance_type = var.host_instance_type
apply_immediately = var.apply_immediately
deployment_mode = (var.engine_type == "RabbitMQ" && var.deployment_mode == "ACTIVE_STANDBY_MULTI_AZ") ? "CLUSTER_MULTI_AZ" : (var.engine_type == "ActiveMQ" && var.deployment_mode == "CLUSTER_MULTI_AZ") ? "ACTIVE_STANDBY_MULTI_AZ" : var.deployment_mode
storage_type = var.engine_type == "RabbitMQ" ? "ebs" : var.deployment_mode == "ACTIVE_STANDBY_MULTI_AZ" ? "efs" : var.storage_type # only ebs is supported for RabbitMQ
authentication_strategy = var.engine_type == "RabbitMQ" ? "simple" : var.authentication_strategy # ldap is not supported for RabbitMQ
publicly_accessible = var.publicly_accessible
security_groups = [aws_security_group.mq.id]
subnet_ids = local.subnet_ids
broker_name = var.name
engine_type = var.engine_type
engine_version = var.engine_version
host_instance_type = var.host_instance_type
apply_immediately = var.apply_immediately
deployment_mode = (var.engine_type == "RabbitMQ" && var.deployment_mode == "ACTIVE_STANDBY_MULTI_AZ") ? "CLUSTER_MULTI_AZ" : (var.engine_type == "ActiveMQ" && var.deployment_mode == "CLUSTER_MULTI_AZ") ? "ACTIVE_STANDBY_MULTI_AZ" : var.deployment_mode
storage_type = var.engine_type == "RabbitMQ" ? "ebs" : var.deployment_mode == "ACTIVE_STANDBY_MULTI_AZ" ? "efs" : var.storage_type # only ebs is supported for RabbitMQ
authentication_strategy = var.engine_type == "RabbitMQ" ? "simple" : var.authentication_strategy # ldap is not supported for RabbitMQ
publicly_accessible = var.publicly_accessible
security_groups = [aws_security_group.mq.id]
subnet_ids = local.subnet_ids
auto_minor_version_upgrade = true
dynamic "configuration" {
for_each = var.engine_type == "ActiveMQ" ? [1] : []
content {
Expand Down

0 comments on commit e634a36

Please sign in to comment.