From 096dce08e95358c64823568bbee16e544bb61b8d Mon Sep 17 00:00:00 2001 From: Julio Castillo Date: Fri, 11 Feb 2022 00:40:58 +0100 Subject: [PATCH] Use prefix for PF projects --- fast/stages/03-project-factory/prod/README.md | 5 +++-- fast/stages/03-project-factory/prod/main.tf | 1 + fast/stages/03-project-factory/prod/variables.tf | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/fast/stages/03-project-factory/prod/README.md b/fast/stages/03-project-factory/prod/README.md index 9e29742f..7c2d3d68 100644 --- a/fast/stages/03-project-factory/prod/README.md +++ b/fast/stages/03-project-factory/prod/README.md @@ -108,11 +108,12 @@ terraform apply | name | description | type | required | default | producer | |---|---|:---:|:---:|:---:|:---:| | [billing_account_id](variables.tf#L19) | Billing account id. | string | ✓ | | 00-bootstrap | +| [prefix](variables.tf#L44) | Prefix used for resources that need unique names. | string | ✓ | | 00-bootstrap | | [data_dir](variables.tf#L25) | Relative path for the folder storing configuration data. | string | | "data/projects" | | | [defaults_file](variables.tf#L38) | Relative path for the file storing the project factory configuration. | string | | "data/defaults.yaml" | | | [environment_dns_zone](variables.tf#L31) | DNS zone suffix for environment. | string | | null | 02-networking | -| [shared_vpc_self_link](variables.tf#L44) | Self link for the shared VPC. | string | | null | 02-networking | -| [vpc_host_project](variables.tf#L51) | Host project for the shared VPC. | string | | null | 02-networking | +| [shared_vpc_self_link](variables.tf#L50) | Self link for the shared VPC. | string | | null | 02-networking | +| [vpc_host_project](variables.tf#L57) | Host project for the shared VPC. | string | | null | 02-networking | ## Outputs diff --git a/fast/stages/03-project-factory/prod/main.tf b/fast/stages/03-project-factory/prod/main.tf index 52c33675..ac562fe9 100644 --- a/fast/stages/03-project-factory/prod/main.tf +++ b/fast/stages/03-project-factory/prod/main.tf @@ -47,6 +47,7 @@ module "projects" { kms_service_agents = try(each.value.kms, {}) labels = try(each.value.labels, {}) org_policies = try(each.value.org_policies, null) + prefix = var.prefix service_accounts = try(each.value.service_accounts, {}) services = try(each.value.services, []) service_identities_iam = try(each.value.services_iam, {}) diff --git a/fast/stages/03-project-factory/prod/variables.tf b/fast/stages/03-project-factory/prod/variables.tf index 721a0ca9..2e2b2c95 100644 --- a/fast/stages/03-project-factory/prod/variables.tf +++ b/fast/stages/03-project-factory/prod/variables.tf @@ -41,6 +41,12 @@ variable "defaults_file" { default = "data/defaults.yaml" } +variable "prefix" { + # tfdoc:variable:source 00-bootstrap + description = "Prefix used for resources that need unique names." + type = string +} + variable "shared_vpc_self_link" { # tfdoc:variable:source 02-networking description = "Self link for the shared VPC."