Merge pull request #534 from GoogleCloudPlatform/jccb/fast-fix-pf

Fix renamed argument to project factory module
This commit is contained in:
Julio Castillo 2022-02-11 08:17:30 +01:00 committed by GitHub
commit 765f291259
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 20 deletions

View File

@ -108,11 +108,12 @@ terraform apply
| name | description | type | required | default | producer | | name | description | type | required | default | producer |
|---|---|:---:|:---:|:---:|:---:| |---|---|:---:|:---:|:---:|:---:|
| [billing_account_id](variables.tf#L19) | Billing account id. | <code>string</code> | ✓ | | <code>00-bootstrap</code> | | [billing_account_id](variables.tf#L19) | Billing account id. | <code>string</code> | ✓ | | <code>00-bootstrap</code> |
| [prefix](variables.tf#L44) | Prefix used for resources that need unique names. | <code>string</code> | ✓ | | <code>00-bootstrap</code> |
| [data_dir](variables.tf#L25) | Relative path for the folder storing configuration data. | <code>string</code> | | <code>&#34;data&#47;projects&#34;</code> | | | [data_dir](variables.tf#L25) | Relative path for the folder storing configuration data. | <code>string</code> | | <code>&#34;data&#47;projects&#34;</code> | |
| [defaults_file](variables.tf#L38) | Relative path for the file storing the project factory configuration. | <code>string</code> | | <code>&#34;data&#47;defaults.yaml&#34;</code> | | | [defaults_file](variables.tf#L38) | Relative path for the file storing the project factory configuration. | <code>string</code> | | <code>&#34;data&#47;defaults.yaml&#34;</code> | |
| [environment_dns_zone](variables.tf#L31) | DNS zone suffix for environment. | <code>string</code> | | <code>null</code> | <code>02-networking</code> | | [environment_dns_zone](variables.tf#L31) | DNS zone suffix for environment. | <code>string</code> | | <code>null</code> | <code>02-networking</code> |
| [shared_vpc_self_link](variables.tf#L44) | Self link for the shared VPC. | <code>string</code> | | <code>null</code> | <code>02-networking</code> | | [shared_vpc_self_link](variables.tf#L50) | Self link for the shared VPC. | <code>string</code> | | <code>null</code> | <code>02-networking</code> |
| [vpc_host_project](variables.tf#L51) | Host project for the shared VPC. | <code>string</code> | | <code>null</code> | <code>02-networking</code> | | [vpc_host_project](variables.tf#L57) | Host project for the shared VPC. | <code>string</code> | | <code>null</code> | <code>02-networking</code> |
## Outputs ## Outputs

View File

@ -33,24 +33,25 @@ locals {
} }
module "projects" { module "projects" {
source = "../../../../examples/factories/project-factory" source = "../../../../examples/factories/project-factory"
for_each = local.projects for_each = local.projects
defaults = local.defaults defaults = local.defaults
project_id = each.key project_id = each.key
billing_account_id = try(each.value.billing_account_id, null) billing_account_id = try(each.value.billing_account_id, null)
billing_alert = try(each.value.billing_alert, null) billing_alert = try(each.value.billing_alert, null)
dns_zones = try(each.value.dns_zones, []) dns_zones = try(each.value.dns_zones, [])
essential_contacts = try(each.value.essential_contacts, []) essential_contacts = try(each.value.essential_contacts, [])
folder_id = each.value.folder_id folder_id = each.value.folder_id
group_iam = try(each.value.group_iam, {}) group_iam = try(each.value.group_iam, {})
iam = try(each.value.iam, {}) iam = try(each.value.iam, {})
kms_service_agents = try(each.value.kms, {}) kms_service_agents = try(each.value.kms, {})
labels = try(each.value.labels, {}) labels = try(each.value.labels, {})
org_policies = try(each.value.org_policies, null) org_policies = try(each.value.org_policies, null)
service_accounts = try(each.value.service_accounts, {}) prefix = var.prefix
services = try(each.value.services, []) service_accounts = try(each.value.service_accounts, {})
services_iam = try(each.value.services_iam, {}) services = try(each.value.services, [])
vpc = try(each.value.vpc, null) service_identities_iam = try(each.value.services_iam, {})
vpc = try(each.value.vpc, null)
} }

View File

@ -41,6 +41,12 @@ variable "defaults_file" {
default = "data/defaults.yaml" 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" { variable "shared_vpc_self_link" {
# tfdoc:variable:source 02-networking # tfdoc:variable:source 02-networking
description = "Self link for the shared VPC." description = "Self link for the shared VPC."