Skip to content

Commit

Permalink
Merge pull request #802 from modular-magician/codegen-pr-1872
Browse files Browse the repository at this point in the history
Use random name in instance template to enable parallel testing
  • Loading branch information
slevenick authored Jun 3, 2019
2 parents 8225d17 + 5e08971 commit 26a903c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,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 @@ -184,21 +184,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-backend-%{random_suffix}"
machine_type = "n1-standard-1"
network_interface {
Expand Down
10 changes: 5 additions & 5 deletions google-beta/resource_compute_global_forwarding_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,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 @@ -428,18 +428,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
12 changes: 6 additions & 6 deletions website/docs/r/compute_global_forwarding_rule.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,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 @@ -160,21 +160,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-backend"
machine_type = "n1-standard-1"
network_interface {
Expand Down

0 comments on commit 26a903c

Please sign in to comment.