Update fast/stages/2-project-factory/outputs.tf

Co-authored-by: Wiktor Niesiobędzki <github@vink.pl>
This commit is contained in:
Ludovico Magnocavallo
2025-03-04 06:58:42 +01:00
committed by Wiktor Niesiobędzki
parent 103548a8f3
commit 94a406a3ef

View File

@@ -59,7 +59,7 @@ output "service_accounts" {
# generate tfvars file for subsequent stages
resource "local_file" "providers" {
for_each = var.outputs_location != null ? { for v in local.project_provider_data : v.key => v } : {}
for_each = var.outputs_location == null ? {} : { for v in local.project_provider_data : v.key => v }
file_permission = "0644"
filename = "${pathexpand(var.outputs_location)}/providers/${var.stage_name}/${each.key}-providers.tf"
content = templatefile("templates/providers.tf.tpl", each.value)