Skip to content

Commit

Permalink
remove duplicate count in firewall rule for backend health check
Browse files Browse the repository at this point in the history
  • Loading branch information
danisla committed Sep 20, 2018
1 parent 038c950 commit 45c9c34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ resource "google_compute_http_health_check" "default" {
port = "${element(split(",", element(var.backend_params, count.index)), 2)}"
}

# Create firewall rule for each backend in each network specified, uses mod behavior of element().
resource "google_compute_firewall" "default-hc" {
count = "${length(var.firewall_networks)}"
project = "${var.firewall_projects[0] == "default" ? var.project : element(var.firewall_projects, count.index)}"
count = "${length(var.backend_params)}"
count = "${length(var.firewall_networks) * length(var.backend_params)}"
project = "${element(var.firewall_projects, count.index)}"
name = "${var.name}-hc-${count.index}"
network = "${element(var.firewall_networks, count.index)}"
source_ranges = ["130.211.0.0/22", "35.191.0.0/16", "209.85.152.0/22", "209.85.204.0/22"]
Expand Down

0 comments on commit 45c9c34

Please sign in to comment.