Skip to content

Commit

Permalink
align net stages exported tfvars, add psc and proxy only subnets (#2204)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoo authored Apr 8, 2024
1 parent d20b497 commit f0197c2
Show file tree
Hide file tree
Showing 10 changed files with 180 additions and 47 deletions.
12 changes: 6 additions & 6 deletions fast/stages/2-networking-a-peering/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,10 @@ DNS configurations are centralised in the `dns-*.tf` files. Spokes delegate DNS

| name | description | sensitive | consumers |
|---|---|:---:|---|
| [cloud_dns_inbound_policy](outputs.tf#L63) | IP Addresses for Cloud DNS inbound policy. | | |
| [host_project_ids](outputs.tf#L68) | Network project ids. | | |
| [host_project_numbers](outputs.tf#L73) | Network project numbers. | | |
| [shared_vpc_self_links](outputs.tf#L78) | Shared VPC host projects. | | |
| [tfvars](outputs.tf#L83) | Terraform variables file for the following stages. || |
| [vpn_gateway_endpoints](outputs.tf#L89) | External IP Addresses for the GCP VPN gateways. | | |
| [cloud_dns_inbound_policy](outputs.tf#L87) | IP Addresses for Cloud DNS inbound policy. | | |
| [host_project_ids](outputs.tf#L92) | Network project ids. | | |
| [host_project_numbers](outputs.tf#L97) | Network project numbers. | | |
| [shared_vpc_self_links](outputs.tf#L102) | Shared VPC host projects. | | |
| [tfvars](outputs.tf#L107) | Terraform variables file for the following stages. || |
| [vpn_gateway_endpoints](outputs.tf#L113) | External IP Addresses for the GCP VPN gateways. | | |
<!-- END TFDOC -->
32 changes: 28 additions & 4 deletions fast/stages/2-networking-a-peering/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,35 @@ locals {
dev-spoke-0 = module.dev-spoke-vpc.subnet_self_links
prod-spoke-0 = module.prod-spoke-vpc.subnet_self_links
}
subnet_proxy_only_self_links = {
prod-landing = {
for k, v in module.landing-vpc.subnets_proxy_only : k => v.id
}
dev-spoke-0 = {
for k, v in module.dev-spoke-vpc.subnets_proxy_only : k => v.id
}
prod-spoke-0 = {
for k, v in module.prod-spoke-vpc.subnets_proxy_only : k => v.id
}
}
subnet_psc_self_links = {
prod-landing = {
for k, v in module.landing-vpc.subnets_psc : k => v.id
}
dev-spoke-0 = {
for k, v in module.dev-spoke-vpc.subnets_psc : k => v.id
}
prod-spoke-0 = {
for k, v in module.prod-spoke-vpc.subnets_psc : k => v.id
}
}
tfvars = {
host_project_ids = local.host_project_ids
host_project_numbers = local.host_project_numbers
subnet_self_links = local.subnet_self_links
vpc_self_links = local.vpc_self_links
host_project_ids = local.host_project_ids
host_project_numbers = local.host_project_numbers
subnet_self_links = local.subnet_self_links
subnet_proxy_only_self_links = local.subnet_proxy_only_self_links
subnet_psc_self_links = local.subnet_psc_self_links
vpc_self_links = local.vpc_self_links
}
vpc_self_links = {
prod-landing = module.landing-vpc.self_link
Expand Down
12 changes: 6 additions & 6 deletions fast/stages/2-networking-b-vpn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,10 @@ DNS configurations are centralised in the `dns-*.tf` files. Spokes delegate DNS

| name | description | sensitive | consumers |
|---|---|:---:|---|
| [cloud_dns_inbound_policy](outputs.tf#L63) | IP Addresses for Cloud DNS inbound policy. | | |
| [host_project_ids](outputs.tf#L68) | Network project ids. | | |
| [host_project_numbers](outputs.tf#L73) | Network project numbers. | | |
| [shared_vpc_self_links](outputs.tf#L78) | Shared VPC host projects. | | |
| [tfvars](outputs.tf#L83) | Terraform variables file for the following stages. || |
| [vpn_gateway_endpoints](outputs.tf#L89) | External IP Addresses for the GCP VPN gateways. | | |
| [cloud_dns_inbound_policy](outputs.tf#L87) | IP Addresses for Cloud DNS inbound policy. | | |
| [host_project_ids](outputs.tf#L92) | Network project ids. | | |
| [host_project_numbers](outputs.tf#L97) | Network project numbers. | | |
| [shared_vpc_self_links](outputs.tf#L102) | Shared VPC host projects. | | |
| [tfvars](outputs.tf#L107) | Terraform variables file for the following stages. || |
| [vpn_gateway_endpoints](outputs.tf#L113) | External IP Addresses for the GCP VPN gateways. | | |
<!-- END TFDOC -->
32 changes: 28 additions & 4 deletions fast/stages/2-networking-b-vpn/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,35 @@ locals {
dev-spoke-0 = module.dev-spoke-vpc.subnet_self_links
prod-spoke-0 = module.prod-spoke-vpc.subnet_self_links
}
subnet_proxy_only_self_links = {
prod-landing = {
for k, v in module.landing-vpc.subnets_proxy_only : k => v.id
}
dev-spoke-0 = {
for k, v in module.dev-spoke-vpc.subnets_proxy_only : k => v.id
}
prod-spoke-0 = {
for k, v in module.prod-spoke-vpc.subnets_proxy_only : k => v.id
}
}
subnet_psc_self_links = {
prod-landing = {
for k, v in module.landing-vpc.subnets_psc : k => v.id
}
dev-spoke-0 = {
for k, v in module.dev-spoke-vpc.subnets_psc : k => v.id
}
prod-spoke-0 = {
for k, v in module.prod-spoke-vpc.subnets_psc : k => v.id
}
}
tfvars = {
host_project_ids = local.host_project_ids
host_project_numbers = local.host_project_numbers
subnet_self_links = local.subnet_self_links
vpc_self_links = local.vpc_self_links
host_project_ids = local.host_project_ids
host_project_numbers = local.host_project_numbers
subnet_self_links = local.subnet_self_links
subnet_proxy_only_self_links = local.subnet_proxy_only_self_links
subnet_psc_self_links = local.subnet_psc_self_links
vpc_self_links = local.vpc_self_links
}
vpc_self_links = {
prod-landing = module.landing-vpc.self_link
Expand Down
10 changes: 5 additions & 5 deletions fast/stages/2-networking-c-nva/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,9 @@ DNS configurations are centralised in the `dns-*.tf` files. Spokes delegate DNS

| name | description | sensitive | consumers |
|---|---|:---:|---|
| [host_project_ids](outputs.tf#L58) | Network project ids. | | |
| [host_project_numbers](outputs.tf#L63) | Network project numbers. | | |
| [shared_vpc_self_links](outputs.tf#L68) | Shared VPC host projects. | | |
| [tfvars](outputs.tf#L73) | Terraform variables file for the following stages. || |
| [vpn_gateway_endpoints](outputs.tf#L79) | External IP Addresses for the GCP VPN gateways. | | |
| [host_project_ids](outputs.tf#L88) | Network project ids. | | |
| [host_project_numbers](outputs.tf#L93) | Network project numbers. | | |
| [shared_vpc_self_links](outputs.tf#L98) | Shared VPC host projects. | | |
| [tfvars](outputs.tf#L103) | Terraform variables file for the following stages. || |
| [vpn_gateway_endpoints](outputs.tf#L109) | External IP Addresses for the GCP VPN gateways. | | |
<!-- END TFDOC -->
36 changes: 33 additions & 3 deletions fast/stages/2-networking-c-nva/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,40 @@ locals {
prod-landing = module.landing-project.number
prod-spoke-0 = module.prod-spoke-project.number
}
subnet_self_links = {
prod-landing = module.landing-vpc.subnet_self_links
dev-spoke-0 = module.dev-spoke-vpc.subnet_self_links
prod-spoke-0 = module.prod-spoke-vpc.subnet_self_links
}
subnet_proxy_only_self_links = {
prod-landing = {
for k, v in module.landing-vpc.subnets_proxy_only : k => v.id
}
dev-spoke-0 = {
for k, v in module.dev-spoke-vpc.subnets_proxy_only : k => v.id
}
prod-spoke-0 = {
for k, v in module.prod-spoke-vpc.subnets_proxy_only : k => v.id
}
}
subnet_psc_self_links = {
prod-landing = {
for k, v in module.landing-vpc.subnets_psc : k => v.id
}
dev-spoke-0 = {
for k, v in module.dev-spoke-vpc.subnets_psc : k => v.id
}
prod-spoke-0 = {
for k, v in module.prod-spoke-vpc.subnets_psc : k => v.id
}
}
tfvars = {
host_project_ids = local.host_project_ids
host_project_numbers = local.host_project_numbers
vpc_self_links = local.vpc_self_links
host_project_ids = local.host_project_ids
host_project_numbers = local.host_project_numbers
subnet_self_links = local.subnet_self_links
subnet_proxy_only_self_links = local.subnet_proxy_only_self_links
subnet_psc_self_links = local.subnet_psc_self_links
vpc_self_links = local.vpc_self_links
}
vpc_self_links = {
prod-landing = module.landing-vpc.self_link
Expand Down
14 changes: 7 additions & 7 deletions fast/stages/2-networking-d-separate-envs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,11 @@ Regions are defined via the `regions` variable which sets up a mapping between t

| name | description | sensitive | consumers |
|---|---|:---:|---|
| [dev_cloud_dns_inbound_policy](outputs.tf#L59) | IP Addresses for Cloud DNS inbound policy for the dev environment. | | |
| [host_project_ids](outputs.tf#L64) | Network project ids. | | |
| [host_project_numbers](outputs.tf#L69) | Network project numbers. | | |
| [prod_cloud_dns_inbound_policy](outputs.tf#L74) | IP Addresses for Cloud DNS inbound policy for the prod environment. | | |
| [shared_vpc_self_links](outputs.tf#L79) | Shared VPC host projects. | | |
| [tfvars](outputs.tf#L84) | Terraform variables file for the following stages. || |
| [vpn_gateway_endpoints](outputs.tf#L90) | External IP Addresses for the GCP VPN gateways. | | |
| [dev_cloud_dns_inbound_policy](outputs.tf#L77) | IP Addresses for Cloud DNS inbound policy for the dev environment. | | |
| [host_project_ids](outputs.tf#L82) | Network project ids. | | |
| [host_project_numbers](outputs.tf#L87) | Network project numbers. | | |
| [prod_cloud_dns_inbound_policy](outputs.tf#L92) | IP Addresses for Cloud DNS inbound policy for the prod environment. | | |
| [shared_vpc_self_links](outputs.tf#L97) | Shared VPC host projects. | | |
| [tfvars](outputs.tf#L102) | Terraform variables file for the following stages. || |
| [vpn_gateway_endpoints](outputs.tf#L108) | External IP Addresses for the GCP VPN gateways. | | |
<!-- END TFDOC -->
26 changes: 22 additions & 4 deletions fast/stages/2-networking-d-separate-envs/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,29 @@ locals {
dev-spoke-0 = module.dev-spoke-vpc.subnet_self_links
prod-spoke-0 = module.prod-spoke-vpc.subnet_self_links
}
subnet_proxy_only_self_links = {
dev-spoke-0 = {
for k, v in module.dev-spoke-vpc.subnets_proxy_only : k => v.id
}
prod-spoke-0 = {
for k, v in module.prod-spoke-vpc.subnets_proxy_only : k => v.id
}
}
subnet_psc_self_links = {
dev-spoke-0 = {
for k, v in module.dev-spoke-vpc.subnets_psc : k => v.id
}
prod-spoke-0 = {
for k, v in module.prod-spoke-vpc.subnets_psc : k => v.id
}
}
tfvars = {
host_project_ids = local.host_project_ids
host_project_numbers = local.host_project_numbers
subnet_self_links = local.subnet_self_links
vpc_self_links = local.vpc_self_links
host_project_ids = local.host_project_ids
host_project_numbers = local.host_project_numbers
subnet_self_links = local.subnet_self_links
subnet_proxy_only_self_links = local.subnet_proxy_only_self_links
subnet_psc_self_links = local.subnet_psc_self_links
vpc_self_links = local.vpc_self_links
}
vpc_self_links = {
dev-spoke-0 = module.dev-spoke-vpc.self_link
Expand Down
10 changes: 5 additions & 5 deletions fast/stages/2-networking-e-nva-bgp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,9 @@ DNS configurations are centralised in the `dns-*.tf` files. Spokes delegate DNS

| name | description | sensitive | consumers |
|---|---|:---:|---|
| [host_project_ids](outputs.tf#L58) | Network project ids. | | |
| [host_project_numbers](outputs.tf#L63) | Network project numbers. | | |
| [shared_vpc_self_links](outputs.tf#L68) | Shared VPC host projects. | | |
| [tfvars](outputs.tf#L73) | Terraform variables file for the following stages. || |
| [vpn_gateway_endpoints](outputs.tf#L79) | External IP Addresses for the GCP VPN gateways. | | |
| [host_project_ids](outputs.tf#L95) | Network project ids. | | |
| [host_project_numbers](outputs.tf#L100) | Network project numbers. | | |
| [shared_vpc_self_links](outputs.tf#L105) | Shared VPC host projects. | | |
| [tfvars](outputs.tf#L110) | Terraform variables file for the following stages. || |
| [vpn_gateway_endpoints](outputs.tf#L116) | External IP Addresses for the GCP VPN gateways. | | |
<!-- END TFDOC -->
43 changes: 40 additions & 3 deletions fast/stages/2-networking-e-nva-bgp/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,47 @@ locals {
prod-landing = module.landing-project.number
prod-spoke-0 = module.prod-spoke-project.number
}
subnet_self_links = {
prod-dmz = module.dmz-vpc.subnet_self_links
prod-landing = module.landing-vpc.subnet_self_links
dev-spoke-0 = module.dev-spoke-vpc.subnet_self_links
prod-spoke-0 = module.prod-spoke-vpc.subnet_self_links
}
subnet_proxy_only_self_links = {
prod-dmz = {
for k, v in module.dmz-vpc.subnets_proxy_only : k => v.id
}
prod-landing = {
for k, v in module.landing-vpc.subnets_proxy_only : k => v.id
}
dev-spoke-0 = {
for k, v in module.dev-spoke-vpc.subnets_proxy_only : k => v.id
}
prod-spoke-0 = {
for k, v in module.prod-spoke-vpc.subnets_proxy_only : k => v.id
}
}
subnet_psc_self_links = {
prod-dmz = {
for k, v in module.dmz-vpc.subnets_psc : k => v.id
}
prod-landing = {
for k, v in module.landing-vpc.subnets_psc : k => v.id
}
dev-spoke-0 = {
for k, v in module.dev-spoke-vpc.subnets_psc : k => v.id
}
prod-spoke-0 = {
for k, v in module.prod-spoke-vpc.subnets_psc : k => v.id
}
}
tfvars = {
host_project_ids = local.host_project_ids
host_project_numbers = local.host_project_numbers
vpc_self_links = local.vpc_self_links
host_project_ids = local.host_project_ids
host_project_numbers = local.host_project_numbers
subnet_self_links = local.subnet_self_links
subnet_proxy_only_self_links = local.subnet_proxy_only_self_links
subnet_psc_self_links = local.subnet_psc_self_links
vpc_self_links = local.vpc_self_links
}
vpc_self_links = {
prod-landing = module.landing-vpc.self_link
Expand Down

0 comments on commit f0197c2

Please sign in to comment.