terraform-community-modules / tf_aws_elasticsearch

[DEPRECATED] Use https://github.com/terraform-aws-modules/terraform-aws-opensearch
MIT License
79 stars 97 forks source link

Changes in plan if es_zone_awareness is False #40

Closed sshishov closed 4 years ago

sshishov commented 4 years ago

Every time the plan gives changes indicating that awarnes_config should be added even if es_zone_awareness = false or not specified (default).

It happens because by default awarness_config is always added with default value es_zone_awareness_count = 2.

PLAN OUTPUT:

  # module.X.aws_elasticsearch_domain.es_vpc[0] will be updated in-place
  ~ resource "aws_elasticsearch_domain" "es_vpc" {
        ...
        advanced_options      = {
            "rest.action.multi.allow_explicit_index" = "true"
        }
      ...
      ~ cluster_config {
            dedicated_master_count   = 0
            dedicated_master_enabled = false
            instance_count           = 1
            instance_type            = "t2.micro.elasticsearch"
            zone_awareness_enabled   = false

          + zone_awareness_config {
              + availability_zone_count = 2
            }
        }
        ...
    }

And I cannot overcome this issue or come up with any workaround.