Skip to content

Commit

Permalink
mark kms self links as computed (#3802)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored and chrisst committed Jul 11, 2019
1 parent 16071f7 commit 6b04e97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions google/resource_compute_instance.go
Expand Up @@ -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": {
Expand Down Expand Up @@ -282,6 +283,7 @@ func resourceComputeInstance() *schema.Resource {
Type: schema.TypeString,
Optional: true,
DiffSuppressFunc: compareSelfLinkRelativePaths,
Computed: true,
},

"disk_encryption_key_sha256": {
Expand Down
3 changes: 1 addition & 2 deletions google/resource_compute_instance_test.go
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 6b04e97

Please sign in to comment.