From e444dc1d10cfa47f38ac83e0c905b295df48ccdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Lev=C3=A9e?= Date: Wed, 30 Oct 2024 10:30:20 +0100 Subject: [PATCH] fix(composer_net): warning because of null ip range in fw rules --- modules/composer_net/fw.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/composer_net/fw.tf b/modules/composer_net/fw.tf index d23b3c36..29fe15cc 100644 --- a/modules/composer_net/fw.tf +++ b/modules/composer_net/fw.tf @@ -89,7 +89,7 @@ resource "google_compute_firewall" "allow-gkeworkers-egress-master-ip" { } direction = "EGRESS" - destination_ranges = [var.master_ipv4_cidr] + destination_ranges = var.master_ipv4_cidr != null ? [var.master_ipv4_cidr] : [] target_service_accounts = [google_service_account.composer_sa.email] log_config { metadata = "INCLUDE_ALL_METADATA" @@ -172,7 +172,7 @@ resource "google_compute_firewall" "allow-gkeworkers-composer-network-ip" { } target_service_accounts = [google_service_account.composer_sa.email] direction = "EGRESS" - destination_ranges = [var.cloud_composer_network_ipv4_cidr_block] + destination_ranges = var.cloud_composer_network_ipv4_cidr_block != null ? [var.cloud_composer_network_ipv4_cidr_block] : [] log_config { metadata = "INCLUDE_ALL_METADATA"