Skip to content

Commit

Permalink
Add support to choosing the GCP subnet to deploy to. (#132)
Browse files Browse the repository at this point in the history
Signed-off-by: Jesus Perez Rey <[email protected]>

Signed-off-by: Jesus Perez Rey <[email protected]>
  • Loading branch information
chusopr authored Nov 18, 2022
1 parent 76952bd commit fa7cbe7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions roles/common/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ common__azure_netapp_nfs_version: "{{ infra.azure.netapp.nfs.version | d
# GCP Infra
common__gcp_project: "{{ infra.gcp.project | default('gcp-se') }}"
common__gcp_region: "{{ infra.gcp.region | default('europe-west1') }}"
common__gcp_subnet_id: "{{ infra.gcp.vpc.subnet_id | default(None) }}"

# Plat
common__xaccount_credential_suffix: "{{ env.cdp.credential.suffix | default(common__xaccount_suffix) }}"
Expand Down
1 change: 1 addition & 0 deletions roles/platform/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ plat__aws_policy_urls: "{{ plat__aws_policy_urls_default

# GCP
plat__gcp_project: "{{ common__gcp_project }}"
plat__gcp_subnet_id: "{{ common__gcp_subnet_id }}"

plat__gcp_role_suffix: "{{ env.gcp.role.suffix | default(common__role_suffix) }}"
plat__gcp_storage_suffix: "{{ env.gcp.storage.suffix | default(common__storage_suffix) }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/platform/tasks/setup_gcp_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
log_identity: "{{ plat__gcp_log_identity_name }}@{{ plat__gcp_project }}.iam.gserviceaccount.com"
vpc_id: "{{ plat__vpc_name }}"
subnet_ids:
- "{{ plat__gcp_subnets_discovered[0].name }}" # TODO - Check in validation_gcp.yml -- CDP on GCP only supports a single subnet deployment
- "{{ plat__gcp_subnet_id if plat__gcp_subnet_id else plat__gcp_subnets_discovered[0].name }}" # TODO - Check in validation_gcp.yml -- CDP on GCP only supports a single subnet deployment
project: "{{ plat__gcp_project }}"
tunnel: "{{ plat__tunnel }}"
workload_analytics: "{{ plat__workload_analytics }}"
Expand Down

0 comments on commit fa7cbe7

Please sign in to comment.