Skip to content

Commit

Permalink
fix: Skip zone_awareness_config if zone_awareness is not enabled (#…
Browse files Browse the repository at this point in the history
…32)

Co-authored-by: Bryant Biggs <[email protected]>
  • Loading branch information
mvalo and bryantbiggs authored Nov 29, 2024
1 parent dde73c8 commit 1ff02d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ resource "aws_opensearch_domain" "this" {
warm_type = try(cluster_config.value.warm_type, null)

dynamic "zone_awareness_config" {
for_each = try([cluster_config.value.zone_awareness_config], [])
for_each = try(cluster_config.value.zone_awareness_enabled, true) ? try([cluster_config.value.zone_awareness_config], []) : []

content {
availability_zone_count = try(zone_awareness_config.value.availability_zone_count, null)
Expand Down

0 comments on commit 1ff02d2

Please sign in to comment.