tests: cleaning up resourcemanager, enabling spanner

- gcp_spanner_instance works, enabling for CI.
- gcp_resourcemanager_project is running into quota issues for
  listing the API to verify state. Adding a to-do as well as
  removing some people-specific names.
This commit is contained in:
Yusuke Tsutsumi 2022-10-09 06:07:25 +00:00
parent 1a753eff05
commit cfbc4d8be5
6 changed files with 14 additions and 9 deletions

View file

@ -134,7 +134,7 @@ EXAMPLES = '''
- name: create a project
google.cloud.gcp_resourcemanager_project:
name: My Sample Project
id: alextest-{{ 10000000000 | random }}
id: ansible-test-{{ 10000000000 | random }}
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
parent:

View file

@ -33,6 +33,7 @@ SERVICE_LIST=(
REQUIRED_ROLE_LIST=(
"roles/storage.objectAdmin"
"roles/source.admin"
"roles/resourcemanager.projects.create"
)
for SERVICE in "${SERVICE_LIST[@]}"; do

View file

@ -16,7 +16,7 @@
- name: delete a project
google.cloud.gcp_resourcemanager_project:
name: My Sample Project
id: alextest-{{ 10000000000 | random }}
id: ansible-test-{{ 10000000000 | random }}
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
parent:
@ -27,7 +27,7 @@
- name: create a project
google.cloud.gcp_resourcemanager_project:
name: My Sample Project
id: alextest-{{ 10000000000 | random }}
id: ansible-test-{{ 10000000000 | random }}
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
parent:
@ -55,7 +55,7 @@
- name: create a project that already exists
google.cloud.gcp_resourcemanager_project:
name: My Sample Project
id: alextest-{{ 10000000000 | random }}
id: ansible-test-{{ 10000000000 | random }}
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
parent:
@ -71,7 +71,7 @@
- name: delete a project
google.cloud.gcp_resourcemanager_project:
name: My Sample Project
id: alextest-{{ 10000000000 | random }}
id: ansible-test-{{ 10000000000 | random }}
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
parent:
@ -99,7 +99,7 @@
- name: delete a project that does not exist
google.cloud.gcp_resourcemanager_project:
name: My Sample Project
id: alextest-{{ 10000000000 | random }}
id: ansible-test-{{ 10000000000 | random }}
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
parent:

View file

@ -71,6 +71,11 @@
assert:
that:
- result.changed == true
# TODO(@toumorokoshi): investigate if the pause helps
# prevent quota issues.
# - name: Pause for 1 minute to keep from hitting quota limit
# ansible.builtin.pause:
# minutes: 1
- name: verify that service was deleted
google.cloud.gcp_serviceusage_service_info:
project: "{{ gcp_project }}"

View file

@ -1,2 +1 @@
cloud/gcp
unsupported