Added a new attribute : source_disk_link
This commit is contained in:
parent
5fcc6593cd
commit
573da4d729
|
@ -59,6 +59,11 @@ func resourceComputeSnapshot() *schema.Resource {
|
|||
ForceNew: true,
|
||||
},
|
||||
|
||||
"source_disk_link": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"project": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
|
@ -137,6 +142,8 @@ func resourceComputeSnapshotRead(d *schema.ResourceData, meta interface{}) error
|
|||
}
|
||||
|
||||
d.Set("self_link", snapshot.SelfLink)
|
||||
d.Set("source_disk_link", snapshot.SourceDisk)
|
||||
d.Set("name", snapshot.Name)
|
||||
|
||||
if snapshot.SnapshotEncryptionKey != nil && snapshot.SnapshotEncryptionKey.Sha256 != "" {
|
||||
d.Set("snapshot_encryption_key_sha256", snapshot.SnapshotEncryptionKey.Sha256)
|
||||
|
@ -146,8 +153,6 @@ func resourceComputeSnapshotRead(d *schema.ResourceData, meta interface{}) error
|
|||
d.Set("source_disk_encryption_key_sha256", snapshot.SourceDiskEncryptionKey.Sha256)
|
||||
}
|
||||
|
||||
d.Set("source_disk", snapshot.SourceDisk)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ The following arguments are supported:
|
|||
|
||||
* `zone` - (Required) The zone where the source disk is located.
|
||||
|
||||
* `source_disk` - (Required) The disk which will be used as the source of the snapshot
|
||||
* `source_disk` - (Required) The disk which will be used as the source of the snapshot.
|
||||
|
||||
- - -
|
||||
|
||||
|
@ -61,4 +61,6 @@ exported:
|
|||
[customer-supplied encryption key](https://cloud.google.com/compute/docs/disks/customer-supplied-encryption)
|
||||
that protects the source disk.
|
||||
|
||||
* `source_disk_link` - The URI of the source disk.
|
||||
|
||||
* `self_link` - The URI of the created resource.
|
||||
|
|
Loading…
Reference in New Issue