Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
22 righe
598 B
22 righe
598 B
data "template_file" "user_data" {
|
|
count = var.node_count
|
|
template = file("${path.module}/files/user_data.cfg")
|
|
vars = {
|
|
pubkey = file("~/.ssh/id_rsa.pub")
|
|
}
|
|
}
|
|
|
|
data "template_file" "meta_data" {
|
|
count = var.node_count
|
|
template = file("${path.module}/files/meta_data.cfg")
|
|
vars = {
|
|
hostname = "swarm-${count.index + 1}"
|
|
}
|
|
}
|
|
|
|
resource "libvirt_cloudinit_disk" "cidata" {
|
|
count = var.node_count
|
|
name = "swarm-${count.index + 1}-cidata.iso"
|
|
user_data = data.template_file.user_data[count.index].rendered
|
|
meta_data = data.template_file.meta_data[count.index].rendered
|
|
}
|