mirror of
https://github.com/ghndrx/linux-copy-demo.git
synced 2026-02-10 15:04:55 +00:00
init repo
This commit is contained in:
31
modules/firewall/main.tf
Normal file
31
modules/firewall/main.tf
Normal file
@@ -0,0 +1,31 @@
|
||||
resource "google_compute_firewall" "allow_internal" {
|
||||
name = "allow-internal"
|
||||
network = var.network_name
|
||||
source_ranges = ["0.0.0.0/0"]
|
||||
allow {
|
||||
protocol = "icmp"
|
||||
}
|
||||
allow {
|
||||
protocol = "tcp"
|
||||
ports = ["0-65535"]
|
||||
}
|
||||
allow {
|
||||
protocol = "udp"
|
||||
ports = ["0-65535"]
|
||||
}
|
||||
target_tags = ["allow-internal"]
|
||||
|
||||
}
|
||||
|
||||
resource "google_compute_firewall" "allow-ssh" {
|
||||
name = "allow-ssh"
|
||||
network = var.network_name
|
||||
source_ranges = ["0.0.0.0/0"]
|
||||
allow {
|
||||
protocol = "tcp"
|
||||
ports = ["22"]
|
||||
}
|
||||
target_tags = ["allow-ssh"]
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user