From ecffbbf5e89c2a354c0331affae85ee689ade9bb Mon Sep 17 00:00:00 2001 From: Dana Hoffman Date: Fri, 25 Oct 2019 14:13:16 -0700 Subject: [PATCH] add nested false field to test --- .../tests/resource_compute_instance_from_template_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/third_party/terraform/tests/resource_compute_instance_from_template_test.go b/third_party/terraform/tests/resource_compute_instance_from_template_test.go index 166d0619842b..84d5d77d064b 100644 --- a/third_party/terraform/tests/resource_compute_instance_from_template_test.go +++ b/third_party/terraform/tests/resource_compute_instance_from_template_test.go @@ -32,6 +32,7 @@ func TestAccComputeInstanceFromTemplate_basic(t *testing.T) { // Check that fields were set based on the template resource.TestCheckResourceAttr(resourceName, "machine_type", "n1-standard-1"), resource.TestCheckResourceAttr(resourceName, "attached_disk.#", "1"), + resource.TestCheckResourceAttr(resourceName, "scheduling.0.automatic_restart", "false"), ), }, }, @@ -255,6 +256,10 @@ resource "google_compute_instance_template" "foobar" { foo = "bar" } + scheduling { + automatic_restart = true + } + can_ip_forward = true } @@ -269,6 +274,9 @@ resource "google_compute_instance_from_template" "foobar" { labels = { my_key = "my_value" } + scheduling { + automatic_restart = false + } } `, template, template, instance) }