provider/google: Write the raw disk encryption key in the state file to avoid diffs on plan (#12068)

This commit is contained in:
Dana Hoffman 2017-02-20 09:28:32 -08:00 committed by Paul Stack
parent 8e41f57694
commit 069467edc1
1 changed files with 8 additions and 7 deletions

View File

@ -801,6 +801,7 @@ func resourceComputeInstanceRead(d *schema.ResourceData, meta interface{}) error
"auto_delete": d.Get(fmt.Sprintf("disk.%d.auto_delete", i)),
"size": d.Get(fmt.Sprintf("disk.%d.size", i)),
"device_name": d.Get(fmt.Sprintf("disk.%d.device_name", i)),
"disk_encryption_key_raw": d.Get(fmt.Sprintf("disk.%d.disk_encryption_key_raw", i)),
}
if disk.DiskEncryptionKey != nil && disk.DiskEncryptionKey.Sha256 != "" {
di["disk_encryption_key_sha256"] = disk.DiskEncryptionKey.Sha256