Skip to content

Commit

Permalink
Fix syntax for router nat example (#2125)
Browse files Browse the repository at this point in the history
Merged PR #2125.
  • Loading branch information
Ty Larrabee authored and modular-magician committed Aug 5, 2019
1 parent df6157a commit a306429
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build/terraform
2 changes: 1 addition & 1 deletion build/terraform-beta
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ resource "google_compute_network" "default" {
resource "google_compute_subnetwork" "default" {
name = "my-subnet"
network = "${google_compute_network.default.self_link}"
network = google_compute_network.default.self_link
ip_cidr_range = "10.0.0.0/16"
region = "us-central1"
}
resource "google_compute_router" "router" {
name = "router"
region = "${google_compute_subnetwork.default.region}"
network = "${google_compute_network.default.self_link}"
region = google_compute_subnetwork.default.region
network = google_compute_network.default.self_link
bgp {
asn = 64514
}
}
resource "google_compute_router_nat" "simple-nat" {
name = "nat-1"
router = "${google_compute_router.router.name}"
router = google_compute_router.router.name
region = "us-central1"
nat_ip_allocate_option = "AUTO_ONLY"
source_subnetwork_ip_ranges_to_nat = "ALL_SUBNETWORKS_ALL_IP_RANGES"
Expand All @@ -58,15 +58,15 @@ resource "google_compute_network" "default" {
resource "google_compute_subnetwork" "default" {
name = "my-subnet"
network = "${google_compute_network.default.self_link}"
network = google_compute_network.default.self_link
ip_cidr_range = "10.0.0.0/16"
region = "us-central1"
}
resource "google_compute_router" "router" {
name = "router"
region = "${google_compute_subnetwork.default.region}"
network = "${google_compute_network.default.self_link}"
region = google_compute_subnetwork.default.region
network = google_compute_network.default.self_link
bgp {
asn = 64514
}
Expand All @@ -80,13 +80,13 @@ resource "google_compute_address" "address" {
resource "google_compute_router_nat" "advanced-nat" {
name = "nat-1"
router = "${google_compute_router.router.name}"
router = google_compute_router.router.name
region = "us-central1"
nat_ip_allocate_option = "MANUAL_ONLY"
nat_ips = ["${google_compute_address.address[*].self_link}"]
nat_ips = google_compute_address.address[*].self_link
source_subnetwork_ip_ranges_to_nat = "LIST_OF_SUBNETWORKS"
subnetwork {
name = "${google_compute_subnetwork.default.self_link}"
name = google_compute_subnetwork.default.self_link
source_ip_ranges_to_nat = ["ALL_IP_RANGES"]
}
log_config {
Expand Down

0 comments on commit a306429

Please sign in to comment.