Skip to content

Commit

Permalink
enforce auto_minor_version_upgrade to true
Browse files Browse the repository at this point in the history
  • Loading branch information
mkgharbi-aneo committed Jan 22, 2025
1 parent 68d734b commit 7c687e2
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 7c687e2

Please sign in to comment.