fix previous merge (#513)

This commit is contained in:
Ludovico Magnocavallo 2022-02-06 18:34:32 +01:00 committed by GitHub
parent c4533503a6
commit d711a93397
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 33 additions and 40 deletions

View File

@ -324,9 +324,9 @@ Names used in internal references (e.g. `module.foo-prod.id`) are only used by T
| name | description | sensitive | consumers |
|---|---|:---:|---|
| [billing_dataset](outputs.tf#L86) | BigQuery dataset prepared for billing export. | | |
| [project_ids](outputs.tf#L91) | Projects created by this stage. | | |
| [providers](outputs.tf#L102) | Terraform provider files for this stage and dependent stages. | ✓ | <code>stage-01</code> |
| [tfvars](outputs.tf#L111) | Terraform variable files for the following stages. | ✓ | |
| [billing_dataset](outputs.tf#L85) | BigQuery dataset prepared for billing export. | | |
| [project_ids](outputs.tf#L90) | Projects created by this stage. | | |
| [providers](outputs.tf#L101) | Terraform provider files for this stage and dependent stages. | ✓ | <code>stage-01</code> |
| [tfvars](outputs.tf#L110) | Terraform variable files for the following stages. | ✓ | |
<!-- END TFDOC -->

View File

@ -15,7 +15,6 @@
*/
locals {
outputs_location = pathexpand(var.outputs_location)
providers = {
"00-bootstrap" = templatefile("${path.module}/../../assets/templates/providers.tpl", {
bucket = module.automation-tf-bootstrap-gcs.name
@ -71,13 +70,13 @@ locals {
resource "local_file" "providers" {
for_each = var.outputs_location == null ? {} : local.providers
filename = "${local.outputs_location}/${each.key}/providers.tf"
filename = "${pathexpand(var.outputs_location)}/${each.key}/providers.tf"
content = each.value
}
resource "local_file" "tfvars" {
for_each = var.outputs_location == null ? {} : local.tfvars
filename = "${local.outputs_location}/${each.key}/terraform-bootstrap.auto.tfvars.json"
filename = "${pathexpand(var.outputs_location)}/${each.key}/terraform-bootstrap.auto.tfvars.json"
content = each.value
}

View File

@ -177,12 +177,12 @@ Due to its simplicity, this stage lends itself easily to customizations: adding
| name | description | sensitive | consumers |
|---|---|:---:|---|
| [networking](outputs.tf#L84) | Data for the networking stage. | | <code>02-networking</code> |
| [project_factories](outputs.tf#L94) | Data for the project factories stage. | | <code>xx-teams</code> |
| [providers](outputs.tf#L111) | Terraform provider files for this stage and dependent stages. | ✓ | <code>02-networking</code> · <code>02-security</code> · <code>xx-sandbox</code> · <code>xx-teams</code> |
| [sandbox](outputs.tf#L118) | Data for the sandbox stage. | | <code>xx-sandbox</code> |
| [security](outputs.tf#L128) | Data for the networking stage. | | <code>02-security</code> |
| [teams](outputs.tf#L138) | Data for the teams stage. | | |
| [tfvars](outputs.tf#L151) | Terraform variable files for the following stages. | ✓ | |
| [networking](outputs.tf#L83) | Data for the networking stage. | | <code>02-networking</code> |
| [project_factories](outputs.tf#L93) | Data for the project factories stage. | | <code>xx-teams</code> |
| [providers](outputs.tf#L110) | Terraform provider files for this stage and dependent stages. | ✓ | <code>02-networking</code> · <code>02-security</code> · <code>xx-sandbox</code> · <code>xx-teams</code> |
| [sandbox](outputs.tf#L117) | Data for the sandbox stage. | | <code>xx-sandbox</code> |
| [security](outputs.tf#L127) | Data for the networking stage. | | <code>02-security</code> |
| [teams](outputs.tf#L137) | Data for the teams stage. | | |
| [tfvars](outputs.tf#L150) | Terraform variable files for the following stages. | ✓ | |
<!-- END TFDOC -->

View File

@ -19,7 +19,6 @@ locals {
dev = module.branch-teams-dev-projectfactory-sa.iam_email
prod = module.branch-teams-prod-projectfactory-sa.iam_email
}
outputs_location = pathexpand(var.outputs_location)
providers = {
"02-networking" = templatefile("${path.module}/../../assets/templates/providers.tpl", {
bucket = module.branch-network-gcs.name
@ -69,13 +68,13 @@ locals {
resource "local_file" "providers" {
for_each = var.outputs_location == null ? {} : local.providers
filename = "${local.outputs_location}/${each.key}/providers.tf"
filename = "${pathexpand(var.outputs_location)}/${each.key}/providers.tf"
content = each.value
}
resource "local_file" "tfvars" {
for_each = var.outputs_location == null ? {} : local.tfvars
filename = "${local.outputs_location}/${each.key}/terraform-resman.auto.tfvars.json"
filename = "${pathexpand(var.outputs_location)}/${each.key}/terraform-resman.auto.tfvars.json"
content = each.value
}

View File

@ -340,11 +340,11 @@ Don't forget to add a peering zone in the landing project and point it to the ne
| name | description | sensitive | consumers |
|---|---|:---:|---|
| [project_ids](outputs.tf#L43) | Network project ids. | | |
| [project_numbers](outputs.tf#L52) | Network project numbers. | | |
| [shared_vpc_host_projects](outputs.tf#L61) | Shared VPC host projects. | | |
| [shared_vpc_self_links](outputs.tf#L70) | Shared VPC host projects. | | |
| [tfvars](outputs.tf#L94) | Network-related variables used in other stages. | ✓ | |
| [vpn_gateway_endpoints](outputs.tf#L80) | External IP Addresses for the GCP VPN gateways. | | |
| [project_ids](outputs.tf#L42) | Network project ids. | | |
| [project_numbers](outputs.tf#L51) | Network project numbers. | | |
| [shared_vpc_host_projects](outputs.tf#L60) | Shared VPC host projects. | | |
| [shared_vpc_self_links](outputs.tf#L69) | Shared VPC host projects. | | |
| [tfvars](outputs.tf#L93) | Network-related variables used in other stages. | ✓ | |
| [vpn_gateway_endpoints](outputs.tf#L79) | External IP Addresses for the GCP VPN gateways. | | |
<!-- END TFDOC -->

View File

@ -17,7 +17,6 @@
# Optionally, generate providers and tfvars files for subsequent stages
locals {
outputs_location = pathexpand(var.outputs_location)
tfvars = {
"03-project-factory-dev" = jsonencode({
environment_dns_zone = module.dev-dns-private-zone.domain
@ -34,7 +33,7 @@ locals {
resource "local_file" "tfvars" {
for_each = var.outputs_location == null ? {} : local.tfvars
filename = "${local.outputs_location}/${each.key}/terraform-networking.auto.tfvars.json"
filename = "${pathexpand(var.outputs_location)}/${each.key}/terraform-networking.auto.tfvars.json"
content = each.value
}

View File

@ -328,12 +328,12 @@ DNS configurations are centralised in the `dns.tf` file. Spokes delegate DNS res
| name | description | sensitive | consumers |
|---|---|:---:|---|
| [cloud_dns_inbound_policy](outputs.tf#L42) | IP Addresses for Cloud DNS inbound policy. | | |
| [project_ids](outputs.tf#L47) | Network project ids. | | |
| [project_numbers](outputs.tf#L56) | Network project numbers. | | |
| [shared_vpc_host_projects](outputs.tf#L65) | Shared VPC host projects. | | |
| [shared_vpc_self_links](outputs.tf#L75) | Shared VPC host projects. | | |
| [tfvars](outputs.tf#L92) | Network-related variables used in other stages. | ✓ | |
| [vpn_gateway_endpoints](outputs.tf#L85) | External IP Addresses for the GCP VPN gateways. | | |
| [cloud_dns_inbound_policy](outputs.tf#L41) | IP Addresses for Cloud DNS inbound policy. | | |
| [project_ids](outputs.tf#L46) | Network project ids. | | |
| [project_numbers](outputs.tf#L55) | Network project numbers. | | |
| [shared_vpc_host_projects](outputs.tf#L64) | Shared VPC host projects. | | |
| [shared_vpc_self_links](outputs.tf#L74) | Shared VPC host projects. | | |
| [tfvars](outputs.tf#L91) | Network-related variables used in other stages. | ✓ | |
| [vpn_gateway_endpoints](outputs.tf#L84) | External IP Addresses for the GCP VPN gateways. | | |
<!-- END TFDOC -->

View File

@ -16,7 +16,6 @@
# optionally generate providers and tfvars files for subsequent stages
locals {
outputs_location = pathexpand(var.outputs_location)
tfvars = {
"03-project-factory-dev" = jsonencode({
environment_dns_zone = module.dev-dns-private-zone.domain
@ -33,7 +32,7 @@ locals {
resource "local_file" "tfvars" {
for_each = var.outputs_location == null ? {} : local.tfvars
filename = "${local.outputs_location}/${each.key}/terraform-networking.auto.tfvars.json"
filename = "${pathexpand(var.outputs_location)}/${each.key}/terraform-networking.auto.tfvars.json"
content = each.value
}

View File

@ -306,6 +306,6 @@ Some references that might be useful in setting up this stage:
| name | description | sensitive | consumers |
|---|---|:---:|---|
| [stage_perimeter_projects](outputs.tf#L40) | Security project numbers. They can be added to perimeter resources. | | |
| [stage_perimeter_projects](outputs.tf#L37) | Security project numbers. They can be added to perimeter resources. | | |
<!-- END TFDOC -->

View File

@ -15,13 +15,10 @@
*/
# optionally generate files for subsequent stages
locals {
outputs_location = pathexpand(var.outputs_location)
}
resource "local_file" "dev_sec_kms" {
for_each = var.outputs_location == null ? {} : { 1 = 1 }
filename = "${local.outputs_location}/yamls/02-security-kms-dev-keys.yaml"
filename = "${pathexpand(var.outputs_location)}/yamls/02-security-kms-dev-keys.yaml"
content = yamlencode({
for k, m in module.dev-sec-kms : k => m.key_ids
})
@ -29,7 +26,7 @@ resource "local_file" "dev_sec_kms" {
resource "local_file" "prod_sec_kms" {
for_each = var.outputs_location == null ? {} : { 1 = 1 }
filename = "${local.outputs_location}/yamls/02-security-kms-prod-keys.yaml"
filename = "${pathexpand(var.outputs_location)}/yamls/02-security-kms-prod-keys.yaml"
content = yamlencode({
for k, m in module.prod-sec-kms : k => m.key_ids
})