From a5b6a814fd051dd8c10853ab5427091ab6fc4d67 Mon Sep 17 00:00:00 2001 From: Bharath KKB Date: Tue, 12 Apr 2022 14:39:44 -0500 Subject: [PATCH] fix: alias-ip dynamic block (#242) --- modules/compute_instance/main.tf | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/compute_instance/main.tf b/modules/compute_instance/main.tf index 2a427140..df6f092d 100644 --- a/modules/compute_instance/main.tf +++ b/modules/compute_instance/main.tf @@ -66,12 +66,13 @@ resource "google_compute_instance_from_template" "compute_instance" { network_tier = access_config.value.network_tier } } - } - dynamic "alias_ip_range" { - for_each = var.alias_ip_ranges - content { - ip_cidr_range = alias_ip_range.value.ip_cidr_range - subnetwork_range_name = alias_ip_range.value.subnetwork_range_name + + dynamic "alias_ip_range" { + for_each = var.alias_ip_ranges + content { + ip_cidr_range = alias_ip_range.value.ip_cidr_range + subnetwork_range_name = alias_ip_range.value.subnetwork_range_name + } } } }