From 613d68e41f29b024369ceef2c9805c787318143a Mon Sep 17 00:00:00 2001 From: Artem Loginov Date: Thu, 18 Nov 2021 16:43:44 +0000 Subject: [PATCH] Fix GCP Snapshot module when using own Encryption key --- plugins/modules/gcp_compute_snapshot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/modules/gcp_compute_snapshot.py b/plugins/modules/gcp_compute_snapshot.py index 67a1ab9f8..8398e000d 100644 --- a/plugins/modules/gcp_compute_snapshot.py +++ b/plugins/modules/gcp_compute_snapshot.py @@ -456,8 +456,10 @@ def resource_to_request(module): u'name': module.params.get('name'), u'description': module.params.get('description'), u'storageLocations': module.params.get('storage_locations'), - u'sourceDiskEncryptionKey': SnapshotSourcediskencryptionkey(module.params.get('source_disk_encryption_key', {}),module).to_request(), - u'snapshotEncryptionKey': SnapshotSnapshotencryptionkey(module.params.get('snapshot_encryption_key', {}),module).to_request(), + u'sourceDiskEncryptionKey': SnapshotSourcediskencryptionkey(module.params.get('source_disk_encryption_key', {}), + module).to_request(), + u'snapshotEncryptionKey': SnapshotSnapshotencryptionkey(module.params.get('snapshot_encryption_key', {}), + module).to_request(), u'labels': module.params.get('labels'), } return_vals = {}