From 61717135729c3fd1c6f7e8a447d8fcaba8236110 Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Sun, 20 Nov 2022 07:37:17 +0000 Subject: [PATCH] fix gcp_bigtable_instance gcp_bigtable_instance scope was using an incorrect scope, which was causing oauth requests to not complete successfully. --- plugins/modules/gcp_bigtable_instance.py | 2 +- plugins/modules/gcp_bigtable_instance_info.py | 2 +- tests/integration/targets/gcp_bigtable_instance/aliases | 3 +-- .../targets/gcp_bigtable_instance/tasks/autogen.yml | 4 ---- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/plugins/modules/gcp_bigtable_instance.py b/plugins/modules/gcp_bigtable_instance.py index ab36973..b70b004 100644 --- a/plugins/modules/gcp_bigtable_instance.py +++ b/plugins/modules/gcp_bigtable_instance.py @@ -264,7 +264,7 @@ def main(): ) if not module.params['scopes']: - module.params['scopes'] = ['https://www.googleapis.com/auth/bigtable'] + module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform'] state = module.params['state'] diff --git a/plugins/modules/gcp_bigtable_instance_info.py b/plugins/modules/gcp_bigtable_instance_info.py index 68307a2..deefad0 100644 --- a/plugins/modules/gcp_bigtable_instance_info.py +++ b/plugins/modules/gcp_bigtable_instance_info.py @@ -184,7 +184,7 @@ def main(): module = GcpModule(argument_spec=dict()) if not module.params['scopes']: - module.params['scopes'] = ['https://www.googleapis.com/auth/bigtable'] + module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform'] return_value = {'resources': fetch_list(module, collection(module))} module.exit_json(**return_value) diff --git a/tests/integration/targets/gcp_bigtable_instance/aliases b/tests/integration/targets/gcp_bigtable_instance/aliases index ff7eb2d..0e4419e 100644 --- a/tests/integration/targets/gcp_bigtable_instance/aliases +++ b/tests/integration/targets/gcp_bigtable_instance/aliases @@ -1,2 +1 @@ -cloud/gcp -unsupported \ No newline at end of file +cloud/gcp \ No newline at end of file diff --git a/tests/integration/targets/gcp_bigtable_instance/tasks/autogen.yml b/tests/integration/targets/gcp_bigtable_instance/tasks/autogen.yml index fa9ae5e..23dccf5 100644 --- a/tests/integration/targets/gcp_bigtable_instance/tasks/autogen.yml +++ b/tests/integration/targets/gcp_bigtable_instance/tasks/autogen.yml @@ -48,8 +48,6 @@ project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" - scopes: - - https://www.googleapis.com/auth/bigtable register: results - name: verify that command succeeded assert: @@ -96,8 +94,6 @@ project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" - scopes: - - https://www.googleapis.com/auth/bigtable register: results - name: verify that command succeeded assert: