Skip to content

Commit

Permalink
Use random name in instance template to enable parallel testing (#1872)
Browse files Browse the repository at this point in the history
Merged PR #1872.
  • Loading branch information
slevenick authored and modular-magician committed Jun 3, 2019
1 parent 381f22f commit 0ace53f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 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 @@ -45,7 +45,7 @@ resource "google_compute_backend_service" "default" {
load_balancing_scheme = "INTERNAL_SELF_MANAGED"

backend {
group = "${google_compute_instance_group_manager.foobar.instance_group}"
group = "${google_compute_instance_group_manager.igm.instance_group}"
balancing_mode = "RATE"
capacity_scaler = 0.4
max_rate_per_instance = 50
Expand All @@ -60,21 +60,21 @@ data "google_compute_image" "debian_image" {
project = "debian-cloud"
}

resource "google_compute_instance_group_manager" "foobar" {
resource "google_compute_instance_group_manager" "igm" {
provider = "google-beta"
name = "igm-internal"
version {
instance_template = "${google_compute_instance_template.foobar.self_link}"
instance_template = "${google_compute_instance_template.instance_template.self_link}"
name = "primary"
}
base_instance_name = "foobar"
base_instance_name = "internal-glb"
zone = "us-central1-f"
target_size = 1
}

resource "google_compute_instance_template" "foobar" {
resource "google_compute_instance_template" "instance_template" {
provider = "google-beta"
name = "instance-template-internal"
name = "template-<%= ctx[:vars]['backend_service_name'] %>"
machine_type = "n1-standard-1"

network_interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ resource "google_compute_backend_service" "default" {
load_balancing_scheme = "INTERNAL_SELF_MANAGED"

backend {
group = "${google_compute_instance_group_manager.foobar.instance_group}"
group = "${google_compute_instance_group_manager.igm.instance_group}"
balancing_mode = "RATE"
capacity_scaler = 0.4
max_rate_per_instance = 50
Expand Down Expand Up @@ -438,18 +438,18 @@ data "google_compute_image" "debian_image" {
project = "debian-cloud"
}

resource "google_compute_instance_group_manager" "foobar" {
resource "google_compute_instance_group_manager" "igm" {
name = "igm-internal"
version {
instance_template = "${google_compute_instance_template.foobar.self_link}"
instance_template = "${google_compute_instance_template.instance_template.self_link}"
name = "primary"
}
base_instance_name = "foobar"
base_instance_name = "internal-igm"
zone = "us-central1-f"
target_size = 1
}

resource "google_compute_instance_template" "foobar" {
resource "google_compute_instance_template" "instance_template" {
name = "instance-template-internal"
machine_type = "n1-standard-1"

Expand Down

0 comments on commit 0ace53f

Please sign in to comment.