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 df2d63f69a
commit 108ef0e4f7

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