diff --git a/plugins/modules/gcp_resourcemanager_project.py b/plugins/modules/gcp_resourcemanager_project.py index 41664bf..9cae5f0 100644 --- a/plugins/modules/gcp_resourcemanager_project.py +++ b/plugins/modules/gcp_resourcemanager_project.py @@ -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: diff --git a/scripts/bootstrap-project.sh b/scripts/bootstrap-project.sh index 924d713..2cf6cd9 100755 --- a/scripts/bootstrap-project.sh +++ b/scripts/bootstrap-project.sh @@ -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 diff --git a/tests/integration/targets/gcp_resourcemanager_project/aliases b/tests/integration/targets/gcp_resourcemanager_project/aliases index 9812f01..ff7eb2d 100644 --- a/tests/integration/targets/gcp_resourcemanager_project/aliases +++ b/tests/integration/targets/gcp_resourcemanager_project/aliases @@ -1,2 +1,2 @@ cloud/gcp -unsupported +unsupported \ No newline at end of file diff --git a/tests/integration/targets/gcp_resourcemanager_project/tasks/autogen.yml b/tests/integration/targets/gcp_resourcemanager_project/tasks/autogen.yml index 81043b0..5e02c41 100644 --- a/tests/integration/targets/gcp_resourcemanager_project/tasks/autogen.yml +++ b/tests/integration/targets/gcp_resourcemanager_project/tasks/autogen.yml @@ -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: diff --git a/tests/integration/targets/gcp_serviceusage_service/tasks/autogen.yml b/tests/integration/targets/gcp_serviceusage_service/tasks/autogen.yml index 473a198..6db1573 100644 --- a/tests/integration/targets/gcp_serviceusage_service/tasks/autogen.yml +++ b/tests/integration/targets/gcp_serviceusage_service/tasks/autogen.yml @@ -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 }}" diff --git a/tests/integration/targets/gcp_spanner_instance/aliases b/tests/integration/targets/gcp_spanner_instance/aliases index 9812f01..0e4419e 100644 --- a/tests/integration/targets/gcp_spanner_instance/aliases +++ b/tests/integration/targets/gcp_spanner_instance/aliases @@ -1,2 +1 @@ -cloud/gcp -unsupported +cloud/gcp \ No newline at end of file