From 4a371ec84e16feea12b03d78cf3435bb4a0b6164 Mon Sep 17 00:00:00 2001 From: The Magician Date: Mon, 29 Apr 2019 12:50:15 -0700 Subject: [PATCH] Bug fixes for GCP modules (#55362) --- lib/ansible/modules/cloud/google/gcp_spanner_database.py | 3 ++- .../integration/targets/gcp_spanner_database/defaults/main.yml | 3 +-- .../integration/targets/gcp_spanner_instance/defaults/main.yml | 3 +-- test/integration/targets/gcp_sql_database/defaults/main.yml | 3 +-- test/integration/targets/gcp_sql_instance/defaults/main.yml | 3 +-- test/integration/targets/gcp_sql_user/defaults/main.yml | 3 +-- test/integration/targets/gcp_storage_bucket/defaults/main.yml | 3 +-- .../gcp_storage_bucket_access_control/defaults/main.yml | 3 +-- 8 files changed, 9 insertions(+), 15 deletions(-) diff --git a/lib/ansible/modules/cloud/google/gcp_spanner_database.py b/lib/ansible/modules/cloud/google/gcp_spanner_database.py index 19306cdd6bb..fe585a05e82 100644 --- a/lib/ansible/modules/cloud/google/gcp_spanner_database.py +++ b/lib/ansible/modules/cloud/google/gcp_spanner_database.py @@ -181,7 +181,8 @@ def create(module, link): def update(module, link): - module.fail_json(msg="Database cannot be edited") + delete(module, self_link(module)) + create(module, collection(module)) def delete(module, link): diff --git a/test/integration/targets/gcp_spanner_database/defaults/main.yml b/test/integration/targets/gcp_spanner_database/defaults/main.yml index aa87a2a8e0e..ba66644fc1c 100644 --- a/test/integration/targets/gcp_spanner_database/defaults/main.yml +++ b/test/integration/targets/gcp_spanner_database/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_spanner_instance/defaults/main.yml b/test/integration/targets/gcp_spanner_instance/defaults/main.yml index aa87a2a8e0e..ba66644fc1c 100644 --- a/test/integration/targets/gcp_spanner_instance/defaults/main.yml +++ b/test/integration/targets/gcp_spanner_instance/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_sql_database/defaults/main.yml b/test/integration/targets/gcp_sql_database/defaults/main.yml index aa87a2a8e0e..ba66644fc1c 100644 --- a/test/integration/targets/gcp_sql_database/defaults/main.yml +++ b/test/integration/targets/gcp_sql_database/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_sql_instance/defaults/main.yml b/test/integration/targets/gcp_sql_instance/defaults/main.yml index aa87a2a8e0e..ba66644fc1c 100644 --- a/test/integration/targets/gcp_sql_instance/defaults/main.yml +++ b/test/integration/targets/gcp_sql_instance/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_sql_user/defaults/main.yml b/test/integration/targets/gcp_sql_user/defaults/main.yml index aa87a2a8e0e..ba66644fc1c 100644 --- a/test/integration/targets/gcp_sql_user/defaults/main.yml +++ b/test/integration/targets/gcp_sql_user/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_storage_bucket/defaults/main.yml b/test/integration/targets/gcp_storage_bucket/defaults/main.yml index aa87a2a8e0e..ba66644fc1c 100644 --- a/test/integration/targets/gcp_storage_bucket/defaults/main.yml +++ b/test/integration/targets/gcp_storage_bucket/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_storage_bucket_access_control/defaults/main.yml b/test/integration/targets/gcp_storage_bucket_access_control/defaults/main.yml index aa87a2a8e0e..ba66644fc1c 100644 --- a/test/integration/targets/gcp_storage_bucket_access_control/defaults/main.yml +++ b/test/integration/targets/gcp_storage_bucket_access_control/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}"