diff --git a/plugins/modules/gcp_compute_address.py b/plugins/modules/gcp_compute_address.py index 61183575..87158cd5 100644 --- a/plugins/modules/gcp_compute_address.py +++ b/plugins/modules/gcp_compute_address.py @@ -207,6 +207,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_backend_bucket.py b/plugins/modules/gcp_compute_backend_bucket.py index 2cedd02f..445fa0db 100644 --- a/plugins/modules/gcp_compute_backend_bucket.py +++ b/plugins/modules/gcp_compute_backend_bucket.py @@ -208,6 +208,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_backend_service.py b/plugins/modules/gcp_compute_backend_service.py index 5e0f73e8..4060196b 100644 --- a/plugins/modules/gcp_compute_backend_service.py +++ b/plugins/modules/gcp_compute_backend_service.py @@ -763,6 +763,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_disk.py b/plugins/modules/gcp_compute_disk.py index 5f5429d3..65ddbe0a 100644 --- a/plugins/modules/gcp_compute_disk.py +++ b/plugins/modules/gcp_compute_disk.py @@ -449,6 +449,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_firewall.py b/plugins/modules/gcp_compute_firewall.py index 7c71f568..e425d08c 100644 --- a/plugins/modules/gcp_compute_firewall.py +++ b/plugins/modules/gcp_compute_firewall.py @@ -571,6 +571,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_forwarding_rule.py b/plugins/modules/gcp_compute_forwarding_rule.py index d13b321f..072ea40e 100644 --- a/plugins/modules/gcp_compute_forwarding_rule.py +++ b/plugins/modules/gcp_compute_forwarding_rule.py @@ -421,6 +421,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_global_address.py b/plugins/modules/gcp_compute_global_address.py index 4cb75d20..72ad3851 100644 --- a/plugins/modules/gcp_compute_global_address.py +++ b/plugins/modules/gcp_compute_global_address.py @@ -203,6 +203,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_global_forwarding_rule.py b/plugins/modules/gcp_compute_global_forwarding_rule.py index 642a7647..156de180 100644 --- a/plugins/modules/gcp_compute_global_forwarding_rule.py +++ b/plugins/modules/gcp_compute_global_forwarding_rule.py @@ -437,6 +437,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_health_check.py b/plugins/modules/gcp_compute_health_check.py index 7075683a..a18b02d5 100644 --- a/plugins/modules/gcp_compute_health_check.py +++ b/plugins/modules/gcp_compute_health_check.py @@ -622,6 +622,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_http_health_check.py b/plugins/modules/gcp_compute_http_health_check.py index bc5105a9..1acf2acc 100644 --- a/plugins/modules/gcp_compute_http_health_check.py +++ b/plugins/modules/gcp_compute_http_health_check.py @@ -249,6 +249,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_https_health_check.py b/plugins/modules/gcp_compute_https_health_check.py index c663c948..9e5d9fe6 100644 --- a/plugins/modules/gcp_compute_https_health_check.py +++ b/plugins/modules/gcp_compute_https_health_check.py @@ -246,6 +246,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_image.py b/plugins/modules/gcp_compute_image.py index 1a1f2257..c9050e04 100644 --- a/plugins/modules/gcp_compute_image.py +++ b/plugins/modules/gcp_compute_image.py @@ -507,6 +507,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_instance.py b/plugins/modules/gcp_compute_instance.py index 14b66f09..d31bc078 100644 --- a/plugins/modules/gcp_compute_instance.py +++ b/plugins/modules/gcp_compute_instance.py @@ -1120,6 +1120,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} if fetch: instance = InstancePower(module, fetch.get('status')) diff --git a/plugins/modules/gcp_compute_instance_group.py b/plugins/modules/gcp_compute_instance_group.py index 9ecf9f82..e92f52e3 100644 --- a/plugins/modules/gcp_compute_instance_group.py +++ b/plugins/modules/gcp_compute_instance_group.py @@ -291,6 +291,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} if fetch: instance = InstanceLogic(module) diff --git a/plugins/modules/gcp_compute_instance_group_manager.py b/plugins/modules/gcp_compute_instance_group_manager.py index 27f07ecc..bfaabe54 100644 --- a/plugins/modules/gcp_compute_instance_group_manager.py +++ b/plugins/modules/gcp_compute_instance_group_manager.py @@ -407,6 +407,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_instance_template.py b/plugins/modules/gcp_compute_instance_template.py index 482deaea..7bfed30b 100644 --- a/plugins/modules/gcp_compute_instance_template.py +++ b/plugins/modules/gcp_compute_instance_template.py @@ -1048,6 +1048,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_network.py b/plugins/modules/gcp_compute_network.py index 3082f589..13ab8e97 100644 --- a/plugins/modules/gcp_compute_network.py +++ b/plugins/modules/gcp_compute_network.py @@ -270,6 +270,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_route.py b/plugins/modules/gcp_compute_route.py index c7d040e3..91ff03fa 100644 --- a/plugins/modules/gcp_compute_route.py +++ b/plugins/modules/gcp_compute_route.py @@ -277,6 +277,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_router.py b/plugins/modules/gcp_compute_router.py index ca11f27a..3435e209 100644 --- a/plugins/modules/gcp_compute_router.py +++ b/plugins/modules/gcp_compute_router.py @@ -301,6 +301,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_ssl_certificate.py b/plugins/modules/gcp_compute_ssl_certificate.py index 00ede6a5..c149b391 100644 --- a/plugins/modules/gcp_compute_ssl_certificate.py +++ b/plugins/modules/gcp_compute_ssl_certificate.py @@ -200,6 +200,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_ssl_policy.py b/plugins/modules/gcp_compute_ssl_policy.py index 0c5ea437..04803a49 100644 --- a/plugins/modules/gcp_compute_ssl_policy.py +++ b/plugins/modules/gcp_compute_ssl_policy.py @@ -237,6 +237,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_subnetwork.py b/plugins/modules/gcp_compute_subnetwork.py index b9551fa3..1def880e 100644 --- a/plugins/modules/gcp_compute_subnetwork.py +++ b/plugins/modules/gcp_compute_subnetwork.py @@ -301,6 +301,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_target_http_proxy.py b/plugins/modules/gcp_compute_target_http_proxy.py index ac49fec3..3bc690e6 100644 --- a/plugins/modules/gcp_compute_target_http_proxy.py +++ b/plugins/modules/gcp_compute_target_http_proxy.py @@ -209,6 +209,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_target_https_proxy.py b/plugins/modules/gcp_compute_target_https_proxy.py index 319aefaa..ed8faa59 100644 --- a/plugins/modules/gcp_compute_target_https_proxy.py +++ b/plugins/modules/gcp_compute_target_https_proxy.py @@ -266,6 +266,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_target_pool.py b/plugins/modules/gcp_compute_target_pool.py index 010051a4..0386d7bb 100644 --- a/plugins/modules/gcp_compute_target_pool.py +++ b/plugins/modules/gcp_compute_target_pool.py @@ -279,6 +279,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_target_ssl_proxy.py b/plugins/modules/gcp_compute_target_ssl_proxy.py index 6ffca08a..07157af2 100644 --- a/plugins/modules/gcp_compute_target_ssl_proxy.py +++ b/plugins/modules/gcp_compute_target_ssl_proxy.py @@ -253,6 +253,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_target_tcp_proxy.py b/plugins/modules/gcp_compute_target_tcp_proxy.py index c37023b3..bbf81c25 100644 --- a/plugins/modules/gcp_compute_target_tcp_proxy.py +++ b/plugins/modules/gcp_compute_target_tcp_proxy.py @@ -217,6 +217,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_target_vpn_gateway.py b/plugins/modules/gcp_compute_target_vpn_gateway.py index a8abd3bf..12d311ed 100644 --- a/plugins/modules/gcp_compute_target_vpn_gateway.py +++ b/plugins/modules/gcp_compute_target_vpn_gateway.py @@ -201,6 +201,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_url_map.py b/plugins/modules/gcp_compute_url_map.py index 5f7d0198..f89174f3 100644 --- a/plugins/modules/gcp_compute_url_map.py +++ b/plugins/modules/gcp_compute_url_map.py @@ -438,6 +438,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_compute_vpn_tunnel.py b/plugins/modules/gcp_compute_vpn_tunnel.py index cd28baf6..8c92490b 100644 --- a/plugins/modules/gcp_compute_vpn_tunnel.py +++ b/plugins/modules/gcp_compute_vpn_tunnel.py @@ -302,6 +302,8 @@ def main(): fetch = create(module, collection(module), kind) labels_update(module, module.params, fetch) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_container_cluster.py b/plugins/modules/gcp_container_cluster.py index 72b2e9b9..d0aa3fc5 100644 --- a/plugins/modules/gcp_container_cluster.py +++ b/plugins/modules/gcp_container_cluster.py @@ -660,6 +660,8 @@ def main(): if state == 'present': fetch = create(module, collection(module)) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_container_node_pool.py b/plugins/modules/gcp_container_node_pool.py index 70453b59..4fc6fa27 100644 --- a/plugins/modules/gcp_container_node_pool.py +++ b/plugins/modules/gcp_container_node_pool.py @@ -486,6 +486,8 @@ def main(): if state == 'present': fetch = create(module, collection(module)) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_dns_managed_zone.py b/plugins/modules/gcp_dns_managed_zone.py index c0224c86..3fb65c70 100644 --- a/plugins/modules/gcp_dns_managed_zone.py +++ b/plugins/modules/gcp_dns_managed_zone.py @@ -215,6 +215,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_dns_resource_record_set.py b/plugins/modules/gcp_dns_resource_record_set.py index cd3b2559..f75bbbf3 100644 --- a/plugins/modules/gcp_dns_resource_record_set.py +++ b/plugins/modules/gcp_dns_resource_record_set.py @@ -186,6 +186,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_pubsub_subscription.py b/plugins/modules/gcp_pubsub_subscription.py index 346978bf..2d55d0f5 100644 --- a/plugins/modules/gcp_pubsub_subscription.py +++ b/plugins/modules/gcp_pubsub_subscription.py @@ -262,6 +262,8 @@ def main(): if state == 'present': fetch = create(module, self_link(module)) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_pubsub_topic.py b/plugins/modules/gcp_pubsub_topic.py index ee31cfaa..cd8ca052 100644 --- a/plugins/modules/gcp_pubsub_topic.py +++ b/plugins/modules/gcp_pubsub_topic.py @@ -128,6 +128,8 @@ def main(): if state == 'present': fetch = create(module, self_link(module)) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_spanner_database.py b/plugins/modules/gcp_spanner_database.py index 61542ebb..d8da4403 100644 --- a/plugins/modules/gcp_spanner_database.py +++ b/plugins/modules/gcp_spanner_database.py @@ -165,6 +165,8 @@ def main(): if state == 'present': fetch = create(module, collection(module)) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_spanner_instance.py b/plugins/modules/gcp_spanner_instance.py index 05012d5b..75a16b38 100644 --- a/plugins/modules/gcp_spanner_instance.py +++ b/plugins/modules/gcp_spanner_instance.py @@ -194,6 +194,8 @@ def main(): if state == 'present': fetch = create(module, collection(module)) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_sql_database.py b/plugins/modules/gcp_sql_database.py index 361692fa..b7fd6efe 100644 --- a/plugins/modules/gcp_sql_database.py +++ b/plugins/modules/gcp_sql_database.py @@ -171,6 +171,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_sql_instance.py b/plugins/modules/gcp_sql_instance.py index 1d7fd589..9e85e311 100644 --- a/plugins/modules/gcp_sql_instance.py +++ b/plugins/modules/gcp_sql_instance.py @@ -679,6 +679,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_sql_user.py b/plugins/modules/gcp_sql_user.py index 384a1522..6b5a3389 100644 --- a/plugins/modules/gcp_sql_user.py +++ b/plugins/modules/gcp_sql_user.py @@ -174,6 +174,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_storage_bucket.py b/plugins/modules/gcp_storage_bucket.py index 94d42315..25703105 100644 --- a/plugins/modules/gcp_storage_bucket.py +++ b/plugins/modules/gcp_storage_bucket.py @@ -942,6 +942,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed}) diff --git a/plugins/modules/gcp_storage_bucket_access_control.py b/plugins/modules/gcp_storage_bucket_access_control.py index c5330851..77188478 100644 --- a/plugins/modules/gcp_storage_bucket_access_control.py +++ b/plugins/modules/gcp_storage_bucket_access_control.py @@ -229,6 +229,8 @@ def main(): if state == 'present': fetch = create(module, collection(module), kind) changed = True + else: + fetch = {} fetch.update({'changed': changed})