From ac2ebea7c5c5826224ea86dd712efb3ec56f83a4 Mon Sep 17 00:00:00 2001 From: Luca Prete Date: Mon, 20 May 2024 18:40:05 +0200 Subject: [PATCH] [FAST] fix: tenant-factory logging bucket project --- fast/stages/1-tenant-factory/README.md | 7 ++++--- fast/stages/1-tenant-factory/tenant-core.tf | 2 +- fast/stages/1-tenant-factory/variables-fast.tf | 9 +++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/fast/stages/1-tenant-factory/README.md b/fast/stages/1-tenant-factory/README.md index 61f2a3498f..7138bb64ad 100644 --- a/fast/stages/1-tenant-factory/README.md +++ b/fast/stages/1-tenant-factory/README.md @@ -274,9 +274,10 @@ tenant_configs = { |---|---|:---:|:---:|:---:|:---:| | [automation](variables-fast.tf#L19) | Automation resources created by the bootstrap stage. | object({…}) | ✓ | | 0-bootstrap | | [billing_account](variables-fast.tf#L42) | Billing account id. If billing account is not part of the same org set `is_org_level` to `false`. To disable handling of billing IAM roles set `no_iam` to `true`. | object({…}) | ✓ | | 0-bootstrap | -| [org_policy_tags](variables-fast.tf#L104) | Organization policy tags. | object({…}) | ✓ | | 0-bootstrap | -| [organization](variables-fast.tf#L94) | Organization details. | object({…}) | ✓ | | 0-bootstrap | -| [prefix](variables-fast.tf#L114) | Prefix used for resources that need unique names. Use 9 characters or less. | string | ✓ | | 0-bootstrap | +| [logging](variables-fast.tf#L94) | Logging resources created by the bootstrap stage. | object({…}) | ✓ | | 0-bootstrap | +| [org_policy_tags](variables-fast.tf#L113) | Organization policy tags. | object({…}) | ✓ | | 0-bootstrap | +| [organization](variables-fast.tf#L103) | Organization details. | object({…}) | ✓ | | 0-bootstrap | +| [prefix](variables-fast.tf#L123) | Prefix used for resources that need unique names. Use 9 characters or less. | string | ✓ | | 0-bootstrap | | [custom_roles](variables-fast.tf#L53) | Custom roles defined at the org level, in key => id format. | object({…}) | | null | 0-bootstrap | | [groups](variables-fast.tf#L66) | Group names or IAM-format principals to grant organization-level permissions. If just the name is provided, the 'group:' principal and organization domain are interpolated. | object({…}) | | {} | 0-bootstrap | | [locations](variables-fast.tf#L81) | Optional locations for GCS, BigQuery, and logging buckets created here. | object({…}) | | {} | 0-bootstrap | diff --git a/fast/stages/1-tenant-factory/tenant-core.tf b/fast/stages/1-tenant-factory/tenant-core.tf index d2fe22e524..496dcf54f5 100644 --- a/fast/stages/1-tenant-factory/tenant-core.tf +++ b/fast/stages/1-tenant-factory/tenant-core.tf @@ -24,7 +24,7 @@ module "tenant-core-logbucket" { source = "../../../modules/logging-bucket" for_each = local.tenants parent_type = "project" - parent = var.automation.project_id + parent = var.logging.project_id id = "tenant-${each.key}-audit" location = var.locations.logging log_analytics = { enable = true } diff --git a/fast/stages/1-tenant-factory/variables-fast.tf b/fast/stages/1-tenant-factory/variables-fast.tf index a9a52545c5..f4f5beb065 100644 --- a/fast/stages/1-tenant-factory/variables-fast.tf +++ b/fast/stages/1-tenant-factory/variables-fast.tf @@ -91,6 +91,15 @@ variable "locations" { default = {} } +variable "logging" { + # tfdoc:variable:source 0-bootstrap + description = "Logging resources created by the bootstrap stage." + type = object({ + project_id = string + }) + nullable = false +} + variable "organization" { # tfdoc:variable:source 0-bootstrap description = "Organization details."