From f5a05b3097b822237e98a25b1ce2b04688201b92 Mon Sep 17 00:00:00 2001 From: Ludovico Magnocavallo Date: Sat, 18 Oct 2025 14:27:24 +0000 Subject: [PATCH] fix pf merge --- modules/project-factory/projects-defaults.tf | 99 +------------------- 1 file changed, 1 insertion(+), 98 deletions(-) diff --git a/modules/project-factory/projects-defaults.tf b/modules/project-factory/projects-defaults.tf index 5e7ff14f0..94077b6a2 100644 --- a/modules/project-factory/projects-defaults.tf +++ b/modules/project-factory/projects-defaults.tf @@ -25,103 +25,6 @@ locals { defaults = try(var.data_defaults, {}) overrides = try(var.data_overrides, {}) } - data_defaults = { - defaults = merge( - { - billing_account = null - contacts = {} - deletion_policy = null - labels = {} - metric_scopes = [] - parent = null - prefix = null - project_reuse = merge( - { - use_data_source = true - attributes = null - }, - try(local._data_defaults.defaults.project_reuse, { - use_data_source = true - attributes = null - } - ) - ) - service_encryption_key_ids = {} - services = [] - shared_vpc_service_config = merge( - { - host_project = null - iam_bindings_additive = {} - network_users = [] - service_agent_iam = {} - service_agent_subnet_iam = {} - service_iam_grants = [] - network_subnet_users = {} - }, - try(local._data_defaults.defaults.shared_vpc_service_config, { - host_project = null - iam_bindings_additive = {} - network_users = [] - service_agent_iam = {} - service_agent_subnet_iam = {} - service_iam_grants = [] - network_subnet_users = {} - } - ) - ) - storage_location = null - tag_bindings = {} - service_accounts = {} - universe = null - vpc_sc = merge( - { - perimeter_name = null - is_dry_run = false - }, - try(local._data_defaults.defaults.vpc_sc, { - perimeter_name = null - is_dry_run = false - } - ) - ) - logging_data_access = {} - bigquery_location = null - }, - try( - local._data_defaults.defaults, {} - ) - ) - # data_overrides default to null's, to mark that they should not override - overrides = merge({ - billing_account = null - contacts = null - deletion_policy = null - parent = null - prefix = null - service_encryption_key_ids = null - storage_location = null - tag_bindings = null - services = null - service_accounts = null - universe = null - vpc_sc = try( - merge( - { - perimeter_name = null - is_dry_run = false - }, - local._data_defaults.overrides.vpc_sc - ), - null - ) - logging_data_access = null - bigquery_location = null - }, - try( - local._data_defaults.overrides, {} - ) - ) - } _projects_output = { # Semantics of the merges are: # - if data_overrides. is not null, use this value @@ -293,7 +196,7 @@ locals { billing_account = null contacts = {} deletion_policy = null - labels = {} + labels = {} locations = { bigquery = try(local._data_defaults.defaults.locations.bigquery, null) logging = try(local._data_defaults.defaults.locations.logging, null)