From 0f657fc28f4487a219a3a187e46f252290dd9037 Mon Sep 17 00:00:00 2001 From: Chris Stephens Date: Wed, 5 Jun 2019 16:05:51 -0700 Subject: [PATCH] mark kms self links as computed --- third_party/terraform/resources/resource_compute_instance.go | 2 ++ third_party/terraform/tests/resource_compute_instance_test.go | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/third_party/terraform/resources/resource_compute_instance.go b/third_party/terraform/resources/resource_compute_instance.go index 15400cc3abf9..4627b14b2d82 100644 --- a/third_party/terraform/resources/resource_compute_instance.go +++ b/third_party/terraform/resources/resource_compute_instance.go @@ -81,6 +81,7 @@ func resourceComputeInstance() *schema.Resource { ForceNew: true, ConflictsWith: []string{"boot_disk.0.disk_encryption_key_raw"}, DiffSuppressFunc: compareSelfLinkRelativePaths, + Computed: true, }, "initialize_params": { @@ -282,6 +283,7 @@ func resourceComputeInstance() *schema.Resource { Type: schema.TypeString, Optional: true, DiffSuppressFunc: compareSelfLinkRelativePaths, + Computed: true, }, "disk_encryption_key_sha256": { diff --git a/third_party/terraform/tests/resource_compute_instance_test.go b/third_party/terraform/tests/resource_compute_instance_test.go index d5fe9275a1cc..aa8718e4313e 100644 --- a/third_party/terraform/tests/resource_compute_instance_test.go +++ b/third_party/terraform/tests/resource_compute_instance_test.go @@ -2344,7 +2344,6 @@ resource "google_compute_instance" "foobar" { attached_disk { source = "${google_compute_disk.foobar3.self_link}" - kms_key_self_link = "%s" } network_interface { @@ -2360,7 +2359,7 @@ resource "google_compute_instance" "foobar" { diskNames[2], diskNameToEncryptionKey[diskNames[2]].KmsKeyName, "instance-testd-"+acctest.RandString(10), instance, bootEncryptionKey, - diskNameToEncryptionKey[diskNames[0]].KmsKeyName, diskNameToEncryptionKey[diskNames[1]].KmsKeyName, diskNameToEncryptionKey[diskNames[2]].KmsKeyName) + diskNameToEncryptionKey[diskNames[0]].KmsKeyName, diskNameToEncryptionKey[diskNames[1]].KmsKeyName) } func testAccComputeInstance_attachedDisk(disk, instance string) string {