Skip to content

Commit 1f1ebf7

Browse files
Enable dual-stack IPv4/v6 on autonode VM (#96)
* Enable dual-stack IPv4/v6 on autonode VM * Add firewall rule to allow v6 traffic to autonode VM
1 parent 1c92f55 commit 1f1ebf7

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

modules/autojoin/firewall.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,17 @@ resource "google_compute_firewall" "ndt_access" {
3737
source_ranges = ["0.0.0.0/0"]
3838
target_tags = ["ndt-server"]
3939
}
40+
41+
# Allow external access to any port for IPv6 traffic platform VMs.
42+
resource "google_compute_firewall" "ndt_access_ipv6" {
43+
allow {
44+
ports = ["80", "443"]
45+
protocol = "tcp"
46+
}
47+
48+
description = "Allow IPv6 access to NDT servers"
49+
name = "ndt-access-ipv6"
50+
network = google_compute_network.autojoin.name
51+
source_ranges = ["::/0"]
52+
target_tags = ["ndt-server"]
53+
}

modules/autojoin/instances.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ resource "google_compute_instance" "autonode" {
1515
access_config {
1616
nat_ip = google_compute_address.autonode_ipv4.address
1717
}
18+
ipv6_access_config {
19+
network_tier = "PREMIUM"
20+
}
1821
network = google_compute_network.autojoin.name
22+
stack_type = "IPV4_IPV6"
1923
subnetwork = google_compute_subnetwork.autojoin.name
2024
}
2125

0 commit comments

Comments
 (0)