Skip to content

Commit

Permalink
changes to templates/terraform/examples from upgrade012
Browse files Browse the repository at this point in the history
  • Loading branch information
megan07 committed Nov 4, 2019
1 parent b1e73d9 commit 06eab3f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
resource "google_app_engine_application_url_dispatch_rules" "<%= ctx[:primary_resource_id] %>" {
dispatch_rules {
domain = "*"
path = "/*"
domain = "*"
path = "/*"
service = "default"
}

dispatch_rules {
domain = "*"
path = "/admin/*"
service = "${google_app_engine_standard_app_version.admin_v3.service}"
domain = "*"
path = "/admin/*"
service = google_app_engine_standard_app_version.admin_v3.service
}
}

resource "google_app_engine_standard_app_version" "admin_v3" {
version_id = "v3"
service = "admin"
runtime = "nodejs10"
service = "admin"
runtime = "nodejs10"

entrypoint {
shell = "node ./app.js"
Expand All @@ -35,11 +35,11 @@ resource "google_app_engine_standard_app_version" "admin_v3" {
}

resource "google_storage_bucket" "bucket" {
name = "<%= ctx[:vars]['bucket_name'] %>"
name = "<%= ctx[:vars]['bucket_name'] %>"
}

resource "google_storage_bucket_object" "object" {
name = "hello-world.zip"
bucket = "${google_storage_bucket.bucket.name}"
source = "./test-fixtures/appengine/hello-world.zip"
name = "hello-world.zip"
bucket = google_storage_bucket.bucket.name
source = "./test-fixtures/appengine/hello-world.zip"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resource "google_cloudbuild_trigger" "<%= ctx[:primary_resource_id] %>" {
github {
owner = "terraform-providers"
name = "terraform-provider-google-beta"
name = "terraform-provider-google-beta"
push {
branch = "feature-.*"
}
Expand Down
48 changes: 24 additions & 24 deletions templates/terraform/examples/router_nat_manual_ips.tf.erb
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
resource "google_compute_network" "net" {
name = "<%= ctx[:vars]['network_name'] %>"
name = "<%= ctx[:vars]['network_name'] %>"
}

resource "google_compute_subnetwork" "subnet" {
name = "<%= ctx[:vars]['subnet_name'] %>"
network = google_compute_network.net.self_link
ip_cidr_range = "10.0.0.0/16"
region = "us-central1"
name = "<%= ctx[:vars]['subnet_name'] %>"
network = google_compute_network.net.self_link
ip_cidr_range = "10.0.0.0/16"
region = "us-central1"
}

resource "google_compute_router" "router"{
name = "<%= ctx[:vars]['router_name'] %>"
region = google_compute_subnetwork.subnet.region
network = google_compute_network.net.self_link
resource "google_compute_router" "router" {
name = "<%= ctx[:vars]['router_name'] %>"
region = google_compute_subnetwork.subnet.region
network = google_compute_network.net.self_link
}

resource "google_compute_address" "address" {
count = 2
name = "<%= ctx[:vars]['address_name'] %>-${count.index}"
region = google_compute_subnetwork.subnet.region
count = 2
name = "<%= ctx[:vars]['address_name'] %>-${count.index}"
region = google_compute_subnetwork.subnet.region
}

resource "google_compute_router_nat" "<%= ctx[:primary_resource_id] %>" {
name = "<%= ctx[:vars]['nat_name'] %>"
router = google_compute_router.router.name
region = google_compute_router.router.region
nat_ip_allocate_option = "MANUAL_ONLY"
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
source_ip_ranges_to_nat = ["ALL_IP_RANGES"]
}
name = "<%= ctx[:vars]['nat_name'] %>"
router = google_compute_router.router.name
region = google_compute_router.router.region

nat_ip_allocate_option = "MANUAL_ONLY"
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
source_ip_ranges_to_nat = ["ALL_IP_RANGES"]
}
}

0 comments on commit 06eab3f

Please sign in to comment.