-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirewall.tf
47 lines (39 loc) · 930 Bytes
/
firewall.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
resource "google_compute_firewall" "allow_icmp" {
name = "all-allow-icmp"
network = module.vpc.network_name
allow {
protocol = "icmp"
}
}
resource "google_compute_firewall" "allow_internal" {
name = "allow-internal"
network = module.vpc.network_name
allow {
protocol = "tcp"
}
allow {
protocol = "udp"
}
allow {
protocol = "icmp"
}
source_ranges = ["10.0.0.0/8", "172.16.0.0/12"]
}
resource "google_compute_firewall" "allow_load_balancers" {
name = "allow-load-balancers"
network = module.vpc.network_name
allow {
protocol = "tcp"
ports = ["30000-32767"]
}
source_ranges = ["130.211.0.0/22", "209.85.152.0/22", "209.85.204.0/22", "35.191.0.0/16"]
}
resource "google_compute_firewall" "allow_http" {
name = "allow-http"
network = module.vpc.network_name
allow {
protocol = "tcp"
ports = ["80", "443"]
}
target_tags = ["web"]
}