From 7c687e2c112fc021475a43dafc642af1a384014a Mon Sep 17 00:00:00 2001 From: Mohamed Khairallah Gharbi Date: Wed, 22 Jan 2025 12:04:50 +0100 Subject: [PATCH] enforce auto_minor_version_upgrade to true --- storage/aws/mq/main.tf | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/storage/aws/mq/main.tf b/storage/aws/mq/main.tf index 2f12355d5..c8b8d17ab 100644 --- a/storage/aws/mq/main.tf +++ b/storage/aws/mq/main.tf @@ -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 {