mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-07 03:01:06 +00:00
Fix nested read in Snapshot. (#2593)
<!-- This change is generated by MagicModules. --> /cc @rileykarson
This commit is contained in:
parent
7cdef5c9f4
commit
e49b23a6ee
@ -749,7 +749,10 @@ func expandComputeSnapshotSourceDiskEncryptionKey(v interface{}, d *schema.Resou
|
|||||||
}
|
}
|
||||||
|
|
||||||
func resourceComputeSnapshotDecoder(d *schema.ResourceData, meta interface{}, res map[string]interface{}) (map[string]interface{}, error) {
|
func resourceComputeSnapshotDecoder(d *schema.ResourceData, meta interface{}, res map[string]interface{}) (map[string]interface{}, error) {
|
||||||
d.Set("source_disk_link", res["sourceDisk"])
|
d.Set("source_disk_link", ConvertSelfLinkToV1(res["sourceDisk"].(string)))
|
||||||
d.Set("snapshot_encryption_key_sha256", res["snapshotEncryptionKey"].((map[string]interface{}))["sha256"])
|
if snapshotEncryptionKey := res["snapshotEncryptionKey"]; snapshotEncryptionKey != nil {
|
||||||
|
d.Set("snapshot_encryption_key_sha256", snapshotEncryptionKey.((map[string]interface{}))["sha256"])
|
||||||
|
}
|
||||||
|
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user