Skip to content

Commit

Permalink
mark kms self links as computed (#1889)
Browse files Browse the repository at this point in the history
Merged PR #1889.
  • Loading branch information
chrisst authored and modular-magician committed Jul 11, 2019
1 parent 8f64898 commit 5d704d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/ansible
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 5d704d5

Please sign in to comment.