Review by @paddyforan: Rename sourcedisk to source_disk

This commit is contained in:
Thomas Poindessous 2017-03-22 12:09:25 +01:00
parent 5d8ce1376c
commit af5c00a612
2 changed files with 6 additions and 6 deletions

View File

@ -40,24 +40,24 @@ func resourceComputeSnapshot() *schema.Resource {
Computed: true,
},
"sourcedisk_encryption_key_raw": &schema.Schema{
"source_disk_encryption_key_raw": &schema.Schema{
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Sensitive: true,
},
"sourcedisk_encryption_key_sha256": &schema.Schema{
"source_disk_encryption_key_sha256": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"sourcedisk_id": &schema.Schema{
"source_disk_id": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"sourcedisk": &schema.Schema{
"source_disk": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
@ -102,7 +102,7 @@ func resourceComputeSnapshotCreate(d *schema.ResourceData, meta interface{}) err
snapshot.SnapshotEncryptionKey.RawKey = v.(string)
}
if v, ok := d.GetOk("sourcedisk_encryption_key_raw"); ok {
if v, ok := d.GetOk("source_disk_encryption_key_raw"); ok {
snapshot.SourceDiskEncryptionKey = &compute.CustomerEncryptionKey{}
snapshot.SourceDiskEncryptionKey.RawKey = v.(string)
}

View File

@ -152,7 +152,7 @@ resource "google_compute_snapshot" "foobar" {
name = "%s"
disk = "${google_compute_disk.foobar.name}"
zone = "us-central1-a"
sourcedisk_encryption_key_raw = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0="
source_disk_encryption_key_raw = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0="
snapshot_encryption_key_raw = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0="
}`, diskName, snapshotName)
}