Skip to content

Commit

Permalink
mark kms self links as computed
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisst committed Jul 11, 2019
1 parent f6248d2 commit 0f657fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions third_party/terraform/resources/resource_compute_instance.go
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 0f657fc

Please sign in to comment.