pf changes (#3398)

This commit is contained in:
Ludovico Magnocavallo
2025-10-09 13:37:47 +02:00
committed by GitHub
parent 9004b00f00
commit 2ab471d236
2 changed files with 6 additions and 6 deletions

View File

@@ -124,7 +124,7 @@ resource "local_file" "providers" {
for_each = local.of_paths.local == null ? {} : local.of_providers
file_permission = "0644"
filename = (
"${local.of_paths.local}/providers/${each.value.filename}.tf"
"${local.of_paths.local}/providers/${each.value.filename}-providers.tf"
)
content = templatestring(local.of_template, {
bucket = lookup(
@@ -151,7 +151,7 @@ resource "local_file" "tfvars" {
resource "google_storage_bucket_object" "providers" {
for_each = local.of_storage_bucket == null ? {} : local.of_providers
bucket = local.of_storage_bucket
name = "providers/${each.value.filename}.tf"
name = "providers/${each.value.filename}-providers.tf"
content = templatestring(local.of_template, {
bucket = lookup(
local.of_storage_buckets,

View File

@@ -24,7 +24,7 @@ locals {
prefix = coalesce(try(v.automation.prefix, null), v.prefix)
project = try(v.automation.project, null)
service_accounts = try(v.automation.service_accounts, {})
} if try(v.automation.bucket, null) != null
} if try(v.automation.bucket, null) != null || try(v.automation.service_accounts, null) != null
},
{
for k, v in local.projects_input : k => {
@@ -34,7 +34,7 @@ locals {
prefix = coalesce(try(v.automation.prefix, null), v.prefix)
project = try(v.automation.project, null)
service_accounts = try(v.automation.service_accounts, {})
} if try(v.automation.bucket, null) != null
} if try(v.automation.bucket, null) != null || try(v.automation.service_accounts, null) != null
}
)
_automation_buckets = {
@@ -48,7 +48,7 @@ locals {
v.prefix,
local.data_defaults.defaults.prefix
), null)
})
}) if v.bucket != null
}
_automation_sas = flatten(concat([
for k, v in local._automation : [
@@ -58,7 +58,7 @@ locals {
parent = k
parent_name = v.parent_name
})
]
] if v.service_accounts != null
]))
automation_buckets = {
for k, v in local._automation_buckets :