Skip to content

Commit 58f00fc

Browse files
committed
# Merge branch 'master' of https://github.com/samyray/google.cloud
# Squashed commit of the following: # commit 9af6954 # Author: Artem Loginov <[email protected]> #Date: Thu Nov 18 16:39:34 2021 +0000 # Fix GCP Snapshot module when using own Encryption key # Merge branch 'master' of https://github.com/samyray/google.cloud Fix GCP Snapshot module when using own Encryption key # Fix GCP Snapshot module when using own Encryption key # Fix GCP Snapshot module when using own Encryption key
1 parent ec09308 commit 58f00fc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

plugins/modules/gcp_compute_snapshot.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,10 @@ def resource_to_request(module):
456456
u'name': module.params.get('name'),
457457
u'description': module.params.get('description'),
458458
u'storageLocations': module.params.get('storage_locations'),
459+
u'sourceDiskEncryptionKey': SnapshotSourcediskencryptionkey(module.params.get('source_disk_encryption_key', {}),
460+
module).to_request(),
461+
u'snapshotEncryptionKey': SnapshotSnapshotencryptionkey(module.params.get('snapshot_encryption_key', {}),
462+
module).to_request(),
459463
u'labels': module.params.get('labels'),
460464
}
461465
return_vals = {}
@@ -534,6 +538,10 @@ def response_to_hash(module, response):
534538
u'description': module.params.get('description'),
535539
u'storageBytes': response.get(u'storageBytes'),
536540
u'storageLocations': response.get(u'storageLocations'),
541+
u'sourceDiskEncryptionKey': SnapshotSourcediskencryptionkey(module.params.get('source_disk_encryption_key', {}),
542+
module).from_response(),
543+
u'snapshotEncryptionKey': SnapshotSnapshotencryptionkey(module.params.get('snapshot_encryption_key', {}),
544+
module).from_response(),
537545
u'licenses': response.get(u'licenses'),
538546
u'labels': response.get(u'labels'),
539547
u'labelFingerprint': response.get(u'labelFingerprint'),

0 commit comments

Comments
 (0)