Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow skipping GCP availability zones validation. #150

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions roles/platform/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ plat__gcp_log_role_perms: "{{ env.gcp.bindings.logs | defaul

plat__gcp_manage_identities: "{{ env.gcp.manage_identities | default(true) }}"
plat__gcp_enable_services: "{{ env.gcp.auto_enable_services | default(true) }}"
plat__gcp_check_availability_zones: "{{ infra.gcp.check_availability_zones | default(true) }}"

# Azure
plat__azure_app_suffix: "{{ env.azure.app.suffix | default(common__app_suffix) }}"
Expand Down
4 changes: 3 additions & 1 deletion roles/platform/tasks/initialize_setup_gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
# limitations under the License.

- name: Discover available zones for GCP region
when:
- plat__gcp_check_availability_zones
- plat__gcp_availability_zones | length > 0
block:
- name: Fetch list of availability zones filtered by region
ansible.builtin.command: >
Expand All @@ -26,7 +29,6 @@
plat__gcp_availability_zones_discovered: "{{ __gcp_availability_zones_info.stdout | from_json | map(attribute='name') | list }}"

- name: Confirm availability zone access for CDP Environment
when: plat__gcp_availability_zones | length > 0
ansible.builtin.assert:
that:
- plat__gcp_availability_zones is subset(plat__gcp_availability_zones_discovered)
Expand Down
Loading