Skip to content

Commit

Permalink
fix(composer_net): warning because of null ip range in fw rules
Browse files Browse the repository at this point in the history
  • Loading branch information
nlevee committed Oct 30, 2024
1 parent 682faac commit 97d8a69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/composer_net/fw.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 97d8a69

Please sign in to comment.