-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add purpose and role to subnetwork for L7 load balancing
- Loading branch information
Ty Larrabee
committed
Sep 3, 2019
1 parent
2598fff
commit 692bdfb
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
templates/terraform/examples/subnetwork_internal_l7lb.tf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
provider "google-beta" { | ||
region = "us-central1" | ||
zone = "us-central1-a" | ||
} | ||
|
||
resource "google_compute_subnetwork" "network-for-l7lb" { | ||
provider = "google-beta" | ||
name = "<%= ctx[:vars]['subnetwork_name'] %>" | ||
ip_cidr_range = "10.0.0.0/22" | ||
region = "us-central1" | ||
purpose = "INTERNAL_HTTPS_LOAD_BALANCER" | ||
role = "ACTIVE" | ||
network = "${google_compute_network.custom-test.self_link}" | ||
} | ||
|
||
resource "google_compute_network" "custom-test" { | ||
provider = "google-beta" | ||
name = "<%= ctx[:vars]['network_name'] %>" | ||
auto_create_subnetworks = false | ||
} |