Skip to content

Commit

Permalink
only output if nodes are adoptable
Browse files Browse the repository at this point in the history
  • Loading branch information
bastjan committed Oct 29, 2024
1 parent fdee1d3 commit cae0a81
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,29 +50,29 @@ output "master-machineset_yml" {
}

output "infra-machines_yml" {
value = module.infra.machine_yml
value = var.make_worker_adoptable_by_provider ? module.infra.machine_yml : null
}

output "infra-machineset_yml" {
value = module.infra.machineset_yml
value = var.make_worker_adoptable_by_provider ? module.infra.machineset_yml : null
}

output "worker-machines_yml" {
value = module.worker.machine_yml
value = var.make_worker_adoptable_by_provider ? module.worker.machine_yml : null
}

output "worker-machineset_yml" {
value = module.worker.machineset_yml
value = var.make_worker_adoptable_by_provider ? module.worker.machineset_yml : null
}

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

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

0 comments on commit cae0a81

Please sign in to comment.