Skip to content

Commit a857dc6

Browse files
committed
Add support to GPC shared VPCs.
1 parent fa7cbe7 commit a857dc6

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

roles/common/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ common__terraform_remote_state_bucket: "{{ globals.terraform.remote_state_bu
8686
common__terraform_remote_state_lock_table: "{{ globals.terraform.remote_state_lock_table | default('') }}"
8787

8888
common__vpc_name: "{{ infra.vpc.name | default([common__namespace, common__vpc_name_suffix] | join('-')) }}"
89+
common__vpc_project: "{{ infra.vpc.project_id | default(omit) }}"
8990
common__vpc_public_subnet_cidrs: "{{ infra.vpc.public_subnets | default(['10.10.0.0/19', '10.10.32.0/19', '10.10.64.0/19']) }}"
9091
common__vpc_private_subnet_cidrs: "{{ infra.vpc.private_subnets | default(['10.10.96.0/19', '10.10.128.0/19', '10.10.160.0/19']) }}"
9192
common__vpc_private_subnets_suffix: "{{ infra.vpc.public_subnets_suffix | default([common__vpc_subnet_suffix, common__private_suffix] | join('-')) }}"

roles/platform/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ plat__cdp_iam_resource_suffix: "{{ plat__cdp_iam_identities.resou
4848
plat__tags: "{{ common__tags }}"
4949
plat__env_name: "{{ common__env_name }}"
5050
plat__vpc_name: "{{ common__vpc_name }}"
51+
plat__vpc_project: "{{ common__vpc_project }}"
5152
plat__storage_name: "{{ common__storage_name }}"
5253

5354
plat__logs_path: "{{ common__logs_path }}"

roles/platform/tasks/setup_gcp_env.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
log_location: "gs://{{ plat__gcp_storage_location_logs }}"
2727
log_identity: "{{ plat__gcp_log_identity_name }}@{{ plat__gcp_project }}.iam.gserviceaccount.com"
2828
vpc_id: "{{ plat__vpc_name }}"
29+
vpc_project_id: "{{ plat__vpc_project }}"
2930
subnet_ids:
3031
- "{{ 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
3132
project: "{{ plat__gcp_project }}"

0 commit comments

Comments
 (0)