Skip to content

Commit 0bbdcef

Browse files
authored
Allow skipping GCP availability zones validation (#150)
Signed-off-by: Jesus Perez Rey <[email protected]>
1 parent 275d52d commit 0bbdcef

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

roles/platform/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ plat__gcp_log_role_perms: "{{ env.gcp.bindings.logs | defaul
176176

177177
plat__gcp_manage_identities: "{{ env.gcp.manage_identities | default(true) }}"
178178
plat__gcp_enable_services: "{{ env.gcp.auto_enable_services | default(true) }}"
179+
plat__gcp_check_availability_zones: "{{ infra.gcp.check_availability_zones | default(true) }}"
179180

180181
# Azure
181182
plat__azure_app_suffix: "{{ env.azure.app.suffix | default(common__app_suffix) }}"

roles/platform/tasks/initialize_setup_gcp.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
# limitations under the License.
1616

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

2831
- name: Confirm availability zone access for CDP Environment
29-
when: plat__gcp_availability_zones | length > 0
3032
ansible.builtin.assert:
3133
that:
3234
- plat__gcp_availability_zones is subset(plat__gcp_availability_zones_discovered)

0 commit comments

Comments
 (0)