From 44eb7c2d29a7de758fbdf510b926197899541db1 Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Sun, 20 Nov 2022 07:20:36 +0000 Subject: [PATCH] fix gcp_spanner_database delete gcp_spanner_database erroneously used LRO handling on delete, rather than a standard synchronous function. One side effect was not catching 404s as a not found error code. --- plugins/modules/gcp_spanner_database.py | 2 +- tests/integration/targets/gcp_spanner_database/aliases | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/modules/gcp_spanner_database.py b/plugins/modules/gcp_spanner_database.py index 6a91c25..4d7356f 100644 --- a/plugins/modules/gcp_spanner_database.py +++ b/plugins/modules/gcp_spanner_database.py @@ -286,7 +286,7 @@ def extra_statements_update(module, request, response): def delete(module, link): auth = GcpSession(module, 'spanner') - return wait_for_operation(module, auth.delete(link)) + return return_if_object(module, auth.delete(link)) def resource_to_request(module): diff --git a/tests/integration/targets/gcp_spanner_database/aliases b/tests/integration/targets/gcp_spanner_database/aliases index 9812f01..0e4419e 100644 --- a/tests/integration/targets/gcp_spanner_database/aliases +++ b/tests/integration/targets/gcp_spanner_database/aliases @@ -1,2 +1 @@ -cloud/gcp -unsupported +cloud/gcp \ No newline at end of file