From dda8ef4b6a2151d682ef7cf52a8ce4b8c58d52ab Mon Sep 17 00:00:00 2001 From: Francisco Andrade <45626988+franciscoandrade-unit@users.noreply.github.com> Date: Thu, 23 Feb 2023 11:41:34 +0000 Subject: [PATCH] fix(elasticsearch): fix #143 bug to allow the deployment with 0 master nodes (#145) * fix(elasticsearch): fix #143 bug to allow the deployment with 0 master nodes * Auto Format --------- Co-authored-by: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com> Co-authored-by: Igor Rodionov --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 381dd07..71fa7b0 100644 --- a/main.tf +++ b/main.tf @@ -145,8 +145,8 @@ resource "aws_elasticsearch_domain" "default" { instance_count = var.instance_count instance_type = var.instance_type dedicated_master_enabled = var.dedicated_master_enabled - dedicated_master_count = var.dedicated_master_count - dedicated_master_type = var.dedicated_master_type + dedicated_master_count = var.dedicated_master_enabled ? var.dedicated_master_count : null + dedicated_master_type = var.dedicated_master_enabled ? var.dedicated_master_type : null zone_awareness_enabled = var.zone_awareness_enabled warm_enabled = var.warm_enabled warm_count = var.warm_enabled ? var.warm_count : null