From 21908b9416b9078eaf94edb1f1c235b6be031eaa Mon Sep 17 00:00:00 2001 From: Paddy Carver Date: Fri, 5 Oct 2018 15:28:38 -0700 Subject: [PATCH] Fix test breaks from IGM and cluster changes. --- ...urce_google_compute_instance_group_test.go | 5 ++++- ...ource_compute_autoscaler_generated_test.go | 5 ++++- .../resource_compute_autoscaler_test.go | 5 ++++- .../resource_compute_backend_service_test.go | 20 +++++++++++++++---- google-beta/resource_compute_disk_test.go | 10 +++++++++- ...ompute_region_autoscaler_generated_test.go | 5 ++++- ...resource_compute_region_autoscaler_test.go | 10 ++++++++-- ...rce_compute_region_backend_service_test.go | 5 ++++- 8 files changed, 53 insertions(+), 12 deletions(-) diff --git a/google-beta/data_source_google_compute_instance_group_test.go b/google-beta/data_source_google_compute_instance_group_test.go index bc42d780509..44a40198a82 100644 --- a/google-beta/data_source_google_compute_instance_group_test.go +++ b/google-beta/data_source_google_compute_instance_group_test.go @@ -311,7 +311,10 @@ resource "google_compute_instance_template" "igm-basic" { resource "google_compute_instance_group_manager" "igm" { name = "%s" - instance_template = "${google_compute_instance_template.igm-basic.self_link}" + version { + instance_template = "${google_compute_instance_template.igm-basic.self_link}" + name = "primary" + } base_instance_name = "igm" zone = "us-central1-a" target_size = 10 diff --git a/google-beta/resource_compute_autoscaler_generated_test.go b/google-beta/resource_compute_autoscaler_generated_test.go index ec1f483d59c..fb2f18b3a4c 100644 --- a/google-beta/resource_compute_autoscaler_generated_test.go +++ b/google-beta/resource_compute_autoscaler_generated_test.go @@ -92,7 +92,10 @@ resource "google_compute_instance_group_manager" "foobar" { name = "my-igm-%s" zone = "us-central1-f" - instance_template = "${google_compute_instance_template.foobar.self_link}" + version { + instance_template = "${google_compute_instance_template.foobar.self_link}" + name = "primary" + } target_pools = ["${google_compute_target_pool.foobar.self_link}"] base_instance_name = "foobar" } diff --git a/google-beta/resource_compute_autoscaler_test.go b/google-beta/resource_compute_autoscaler_test.go index f68abb49ff7..4b8b54fab7b 100644 --- a/google-beta/resource_compute_autoscaler_test.go +++ b/google-beta/resource_compute_autoscaler_test.go @@ -260,7 +260,10 @@ resource "google_compute_target_pool" "foobar" { resource "google_compute_instance_group_manager" "foobar" { description = "Terraform test instance group manager" name = "%s" - instance_template = "${google_compute_instance_template.foobar.self_link}" + version { + instance_template = "${google_compute_instance_template.foobar.self_link}" + name = "primary" + } target_pools = ["${google_compute_target_pool.foobar.self_link}"] base_instance_name = "foobar" zone = "us-central1-a" diff --git a/google-beta/resource_compute_backend_service_test.go b/google-beta/resource_compute_backend_service_test.go index 19d8116a6ad..d786d4a721b 100644 --- a/google-beta/resource_compute_backend_service_test.go +++ b/google-beta/resource_compute_backend_service_test.go @@ -699,7 +699,10 @@ resource "google_compute_backend_service" "lipsum" { resource "google_compute_instance_group_manager" "foobar" { name = "%s" - instance_template = "${google_compute_instance_template.foobar.self_link}" + version { + instance_template = "${google_compute_instance_template.foobar.self_link}" + name = "primary" + } base_instance_name = "foobar" zone = "us-central1-f" target_size = 1 @@ -762,7 +765,10 @@ resource "google_compute_backend_service" "lipsum" { resource "google_compute_instance_group_manager" "foobar" { name = "%s" - instance_template = "${google_compute_instance_template.foobar.self_link}" + version { + instance_template = "${google_compute_instance_template.foobar.self_link}" + name = "primary" + } base_instance_name = "foobar" zone = "us-central1-f" target_size = 1 @@ -915,7 +921,10 @@ resource "google_compute_backend_service" "lipsum" { resource "google_compute_instance_group_manager" "foobar" { name = "%s" - instance_template = "${google_compute_instance_template.foobar.self_link}" + version { + instance_template = "${google_compute_instance_template.foobar.self_link}" + name = "primary" + } base_instance_name = "foobar" zone = "us-central1-f" target_size = 1 @@ -973,7 +982,10 @@ resource "google_compute_backend_service" "lipsum" { resource "google_compute_instance_group_manager" "foobar" { name = "%s" - instance_template = "${google_compute_instance_template.foobar.self_link}" + version { + instance_template = "${google_compute_instance_template.foobar.self_link}" + name = "primary" + } base_instance_name = "foobar" zone = "us-central1-f" target_size = 1 diff --git a/google-beta/resource_compute_disk_test.go b/google-beta/resource_compute_disk_test.go index e0a39731ed9..031359e2903 100644 --- a/google-beta/resource_compute_disk_test.go +++ b/google-beta/resource_compute_disk_test.go @@ -802,7 +802,15 @@ resource "google_compute_instance_template" "template" { resource "google_compute_instance_group_manager" "manager" { name = "%s" base_instance_name = "disk-igm" - instance_template = "${google_compute_instance_template.template.self_link}" + version { + instance_template = "${google_compute_instance_template.template.self_link}" + name = "primary" + } + update_policy { + minimal_action = "RESTART" + type = "PROACTIVE" + max_unavailable_fixed = 1 + } zone = "us-central1-a" target_size = 1 }`, diskName, mgrName) diff --git a/google-beta/resource_compute_region_autoscaler_generated_test.go b/google-beta/resource_compute_region_autoscaler_generated_test.go index 369f99068d8..b1d249487e6 100644 --- a/google-beta/resource_compute_region_autoscaler_generated_test.go +++ b/google-beta/resource_compute_region_autoscaler_generated_test.go @@ -92,7 +92,10 @@ resource "google_compute_region_instance_group_manager" "foobar" { name = "my-region-igm-%s" region = "us-central1" - instance_template = "${google_compute_instance_template.foobar.self_link}" + version { + instance_template = "${google_compute_instance_template.foobar.self_link}" + name = "primary" + } target_pools = ["${google_compute_target_pool.foobar.self_link}"] base_instance_name = "foobar" } diff --git a/google-beta/resource_compute_region_autoscaler_test.go b/google-beta/resource_compute_region_autoscaler_test.go index 2336fddc27d..22d11cb024e 100644 --- a/google-beta/resource_compute_region_autoscaler_test.go +++ b/google-beta/resource_compute_region_autoscaler_test.go @@ -191,7 +191,10 @@ resource "google_compute_target_pool" "foobar" { resource "google_compute_region_instance_group_manager" "foobar" { description = "Terraform test instance group manager" name = "%s" - instance_template = "${google_compute_instance_template.foobar.self_link}" + version { + instance_template = "${google_compute_instance_template.foobar.self_link}" + name = "primary" + } target_pools = ["${google_compute_target_pool.foobar.self_link}"] base_instance_name = "foobar" region = "us-central1" @@ -256,7 +259,10 @@ resource "google_compute_target_pool" "foobar" { resource "google_compute_region_instance_group_manager" "foobar" { description = "Terraform test instance group manager" name = "%s" - instance_template = "${google_compute_instance_template.foobar.self_link}" + version { + instance_template = "${google_compute_instance_template.foobar.self_link}" + name = "primary" + } target_pools = ["${google_compute_target_pool.foobar.self_link}"] base_instance_name = "foobar" region = "us-central1" diff --git a/google-beta/resource_compute_region_backend_service_test.go b/google-beta/resource_compute_region_backend_service_test.go index bde3198c499..af947c05098 100644 --- a/google-beta/resource_compute_region_backend_service_test.go +++ b/google-beta/resource_compute_region_backend_service_test.go @@ -328,7 +328,10 @@ resource "google_compute_region_backend_service" "lipsum" { resource "google_compute_instance_group_manager" "foobar" { name = "%s" - instance_template = "${google_compute_instance_template.foobar.self_link}" + version { + instance_template = "${google_compute_instance_template.foobar.self_link}" + name = "primary" + } base_instance_name = "foobar" zone = "us-central1-f" target_size = 1