Skip to content

Commit 1ff02d2

Browse files
mvalobryantbiggs
andauthored
fix: Skip zone_awareness_config if zone_awareness is not enabled (#32)
Co-authored-by: Bryant Biggs <bryantbiggs@gmail.com>
1 parent dde73c8 commit 1ff02d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ resource "aws_opensearch_domain" "this" {
106106
warm_type = try(cluster_config.value.warm_type, null)
107107

108108
dynamic "zone_awareness_config" {
109-
for_each = try([cluster_config.value.zone_awareness_config], [])
109+
for_each = try(cluster_config.value.zone_awareness_enabled, true) ? try([cluster_config.value.zone_awareness_config], []) : []
110110

111111
content {
112112
availability_zone_count = try(zone_awareness_config.value.availability_zone_count, null)

0 commit comments

Comments
 (0)