diff --git a/blueprints/factories/project-factory/main.tf b/blueprints/factories/project-factory/main.tf index 7d173a11a0..9a230063c6 100644 --- a/blueprints/factories/project-factory/main.tf +++ b/blueprints/factories/project-factory/main.tf @@ -33,11 +33,13 @@ module "projects" { iam = try(each.value.iam, {}) iam_bindings = try(each.value.iam_bindings, {}) iam_bindings_additive = try(each.value.iam_bindings_additive, {}) - labels = each.value.labels - lien_reason = try(each.value.lien_reason, null) - logging_data_access = try(each.value.logging_data_access, {}) - logging_exclusions = try(each.value.logging_exclusions, {}) - logging_sinks = try(each.value.logging_sinks, {}) + labels = merge( + each.value.labels, var.data_merges.labels + ) + lien_reason = try(each.value.lien_reason, null) + logging_data_access = try(each.value.logging_data_access, {}) + logging_exclusions = try(each.value.logging_exclusions, {}) + logging_sinks = try(each.value.logging_sinks, {}) metric_scopes = distinct(concat( each.value.metric_scopes, var.data_merges.metric_scopes )) diff --git a/tests/blueprints/factories/project_factory/examples/example.yaml b/tests/blueprints/factories/project_factory/examples/example.yaml index d1eb054eaf..086fbd55c7 100644 --- a/tests/blueprints/factories/project_factory/examples/example.yaml +++ b/tests/blueprints/factories/project_factory/examples/example.yaml @@ -33,6 +33,7 @@ values: folder_id: "12345678" labels: app: app-1 + environment: test team: foo name: test-pf-prj-app-1 org_id: null @@ -64,6 +65,7 @@ values: folder_id: "12345678" labels: app: app-1 + environment: test team: foo name: test-pf-prj-app-2 org_id: null