Last active
September 7, 2020 00:58
-
-
Save Callonski/96946e6d63434115d672a345194478e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "google_compute_firewall" "allow-all-internal" { | |
name = "allow-all-internal" | |
network = google_compute_network.my-elastic-network.name | |
allow { | |
protocol = "tcp" | |
} | |
allow { | |
protocol = "udp" | |
} | |
allow { | |
protocol = "icmp" | |
} | |
source_ranges = ["x.x.x.x/x"] // your subnet IP range | |
} | |
resource "google_compute_firewall" "allow-internal-lb" { | |
name = "allow-internal-lb" | |
network = google_compute_network.my-elastic-network.name | |
allow { | |
protocol = "tcp" | |
ports = var.ports_to_open | |
} | |
source_ranges = ["x.x.x.x/x"] // your subnet IP range | |
target_tags = var.network_tags | |
} | |
resource "google_compute_firewall" "allow-health-check" { | |
name = "allow-health-check" | |
network = google_compute_network.my-elastic-network.name | |
allow { | |
protocol = "tcp" | |
ports = var.ports_to_open | |
} | |
source_ranges = ["x.x.x.x/x"] // your subnet IP range | |
target_tags = var.network_tags | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment