Skip to content

Commit

Permalink
Always enable outputs to not have errors when querying them with `tf …
Browse files Browse the repository at this point in the history
…output`
  • Loading branch information
bastjan committed Nov 6, 2024
1 parent f772bb4 commit ed52206
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ output "worker-machineset_yml" {
}

output "additional-worker-machines_yml" {
value = var.make_worker_adoptable_by_provider && length(module.additional_worker) > 0 ? {
value = var.make_worker_adoptable_by_provider ? yamlencode({
"apiVersion" = "v1",
"kind" = "List",
"items" = flatten(values(module.additional_worker)[*].machines)
} : null
}) : null
}

output "additional-worker-machinesets_yml" {
value = var.make_worker_adoptable_by_provider && length(module.additional_worker) > 0 ? join("\n---\n", values(module.additional_worker)[*].machineset_yml) : null
value = var.make_worker_adoptable_by_provider ? join("\n---\n", values(module.additional_worker)[*].machineset_yml) : null
}

0 comments on commit ed52206

Please sign in to comment.