From 5e08971467ee61a40dca78ebf0a438b9d7f43924 Mon Sep 17 00:00:00 2001 From: Sam Levenick Date: Mon, 3 Jun 2019 22:26:26 +0000 Subject: [PATCH] Use random name in instance template to enable parallel testing Signed-off-by: Modular Magician --- ..._compute_global_forwarding_rule_generated_test.go | 12 ++++++------ .../resource_compute_global_forwarding_rule_test.go | 10 +++++----- .../r/compute_global_forwarding_rule.html.markdown | 12 ++++++------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/google-beta/resource_compute_global_forwarding_rule_generated_test.go b/google-beta/resource_compute_global_forwarding_rule_generated_test.go index b9f6d03c88..794104f9ca 100644 --- a/google-beta/resource_compute_global_forwarding_rule_generated_test.go +++ b/google-beta/resource_compute_global_forwarding_rule_generated_test.go @@ -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 @@ -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 { diff --git a/google-beta/resource_compute_global_forwarding_rule_test.go b/google-beta/resource_compute_global_forwarding_rule_test.go index 0a32362f96..91c4a718d1 100644 --- a/google-beta/resource_compute_global_forwarding_rule_test.go +++ b/google-beta/resource_compute_global_forwarding_rule_test.go @@ -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 @@ -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" diff --git a/website/docs/r/compute_global_forwarding_rule.html.markdown b/website/docs/r/compute_global_forwarding_rule.html.markdown index 3158badffa..fe06c1bcb9 100644 --- a/website/docs/r/compute_global_forwarding_rule.html.markdown +++ b/website/docs/r/compute_global_forwarding_rule.html.markdown @@ -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 @@ -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 {