diff --git a/plugins/modules/gcp_compute_address.py b/plugins/modules/gcp_compute_address.py index 6118357..87158cd 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 2cedd02..445fa0d 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 5e0f73e..4060196 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 5f5429d..65ddbe0 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 7c71f56..e425d08 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 d13b321..072ea40 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 4cb75d2..72ad385 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 642a764..156de18 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 7075683..a18b02d 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 bc5105a..1acf2ac 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 c663c94..9e5d9fe 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 1a1f225..c9050e0 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 14b66f0..d31bc07 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 9ecf9f8..e92f52e 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 27f07ec..bfaabe5 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 482deae..7bfed30 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 3082f58..13ab8e9 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 c7d040e..91ff03f 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 ca11f27..3435e20 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 00ede6a..c149b39 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 0c5ea43..04803a4 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 b9551fa..1def880 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 ac49fec..3bc690e 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 319aefa..ed8faa5 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 010051a..0386d7b 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 6ffca08..07157af 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 c37023b..bbf81c2 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 a8abd3b..12d311e 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 5f7d019..f89174f 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 cd28baf..8c92490 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 72b2e9b..d0aa3fc 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 70453b5..4fc6fa2 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 c0224c8..3fb65c7 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 cd3b255..f75bbbf 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 346978b..2d55d0f 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 ee31cfa..cd8ca05 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 61542eb..d8da440 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 05012d5..75a16b3 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 361692f..b7fd6ef 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 1d7fd58..9e85e31 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 384a152..6b5a338 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 94d4231..2570310 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 c533085..7718847 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})