merge labels from data_merges in project factory (#1662)

* merge labels from data_merges in project factory

* fix project factory test for labels
This commit is contained in:
Pierre Formont 2023-09-08 12:27:46 +02:00 committed by GitHub
parent fcefadbd8e
commit e141b86f79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -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
))

View File

@ -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