|
|
@ -85,7 +85,6 @@ resource "digitalocean_droplet" "machine" {
|
|
|
|
|
|
|
|
|
|
|
|
data "ct_config" "machine-ignitions" {
|
|
|
|
data "ct_config" "machine-ignitions" {
|
|
|
|
for_each = toset(var.machines)
|
|
|
|
for_each = toset(var.machines)
|
|
|
|
# content = data.template_file.machine-configs[each.key].rendered
|
|
|
|
|
|
|
|
content = templatefile("${path.module}/cl/machine-${each.key}.yaml.tmpl", {
|
|
|
|
content = templatefile("${path.module}/cl/machine-${each.key}.yaml.tmpl", {
|
|
|
|
ssh_keys = jsonencode(var.ssh_keys),
|
|
|
|
ssh_keys = jsonencode(var.ssh_keys),
|
|
|
|
name = each.key
|
|
|
|
name = each.key
|
|
|
@ -93,16 +92,6 @@ data "ct_config" "machine-ignitions" {
|
|
|
|
strict = true
|
|
|
|
strict = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#data "template_file" "machine-configs" {
|
|
|
|
|
|
|
|
# for_each = toset(var.machines)
|
|
|
|
|
|
|
|
# template = file("${path.module}/cl/machine-${each.key}.yaml.tmpl")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# vars = {
|
|
|
|
|
|
|
|
# ssh_keys = jsonencode(var.ssh_keys)
|
|
|
|
|
|
|
|
# name = each.key
|
|
|
|
|
|
|
|
# }
|
|
|
|
|
|
|
|
#}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
output "ip-addresses" {
|
|
|
|
output "ip-addresses" {
|
|
|
|
value = {
|
|
|
|
value = {
|
|
|
|
for key in var.machines :
|
|
|
|
for key in var.machines :
|
|
|
|