diff --git a/builtin/providers/google/resource_compute_snapshot.go b/builtin/providers/google/resource_compute_snapshot.go index e43f1f067..adae6faf2 100644 --- a/builtin/providers/google/resource_compute_snapshot.go +++ b/builtin/providers/google/resource_compute_snapshot.go @@ -102,6 +102,11 @@ func resourceComputeSnapshotCreate(d *schema.ResourceData, meta interface{}) err snapshot.SnapshotEncryptionKey.RawKey = v.(string) } + if v, ok := d.GetOk("sourcedisk_encryption_key_raw"); ok { + snapshot.SourceDiskEncryptionKey = &compute.CustomerEncryptionKey{} + snapshot.SourceDiskEncryptionKey.RawKey = v.(string) + } + op, err := config.clientCompute.Disks.CreateSnapshot( project, d.Get("zone").(string), disk, snapshot).Do() if err != nil {