Add support for descriptive name to projects (#3591)

* add support for descriptive name to projects

* boilerplate

* fmt
This commit is contained in:
Ludovico Magnocavallo
2025-12-12 09:06:47 +01:00
committed by GitHub
parent dcb781c97e
commit ab0f55216a
19 changed files with 52 additions and 9 deletions

File diff suppressed because one or more lines are too long

View File

@@ -68,9 +68,10 @@ locals {
try(v.metric_scopes, null),
local.data_defaults.defaults.metric_scopes
)
name = lookup(v, "name", basename(k)) # type: string
org_policies = try(v.org_policies, {}) # type: map(object({...}))
parent = try( # type: string, nullable
descriptive_name = lookup(v, "descriptive_name", null)
name = lookup(v, "name", basename(k)) # type: string
org_policies = try(v.org_policies, {}) # type: map(object({...}))
parent = try( # type: string, nullable
coalesce(
local.data_defaults.overrides.parent,
try(v.parent, null),

View File

@@ -86,6 +86,7 @@ module "projects" {
billing_account = each.value.billing_account
deletion_policy = each.value.deletion_policy
name = each.value.name
descriptive_name = each.value.descriptive_name
parent = each.value.parent
prefix = each.value.prefix
project_reuse = each.value.project_reuse
@@ -100,7 +101,6 @@ module "projects" {
folder_ids = local.ctx_folder_ids
})
default_service_account = try(each.value.default_service_account, "keep")
descriptive_name = try(each.value.descriptive_name, null)
factories_config = {
custom_roles = try(each.value.factories_config.custom_roles, null)
org_policies = try(each.value.factories_config.org_policies, null)

View File

@@ -353,6 +353,9 @@
"name": {
"type": "string"
},
"descriptive_name": {
"type": "string"
},
"org_policies": {
"type": "object",
"additionalProperties": false,

View File

@@ -111,6 +111,7 @@
- **metric_scopes**: *array*
- items: *string*
- **name**: *string*
- **descriptive_name**: *string*
- **org_policies**: *object*
<br>*additional properties: false*
- **`^[a-z]+\.`**: *object*

View File

@@ -308,7 +308,8 @@ variable "projects" {
requester_email_recipients = optional(list(string))
}))
})), {})
name = optional(string)
name = optional(string)
descriptive_name = optional(string)
org_policies = optional(map(object({
inherit_from_parent = optional(bool) # for list policies only.
reset = optional(bool)