-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
barebones.tf
28 lines (22 loc) · 918 Bytes
/
barebones.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#* Generate the CoreOS Ignition configs for the Barebones machines
module "ign_config_barebones" {
source = "./ignition"
ssh_key = file(var.ssh_key_path)
networks = var.barebones.networks
masters = var.barebones.masters
slaves = var.barebones.slaves
nomad_version = var.nomad_version
consul_version = var.consul_version
driver_podman_version = var.driver_podman_version
cni_version = var.cni_version
}
resource "local_sensitive_file" "barebones_ign_masters" {
for_each = var.barebones.masters
filename = "${path.module}/generated/master_${each.key}.ign"
content = module.ign_config_barebones.coreos_masters[each.key].rendered
}
resource "local_sensitive_file" "barebones_ign_slaves" {
for_each = var.barebones.slaves
filename = "${path.module}/generated/master_${each.key}.ign"
content = module.ign_config_barebones.coreos_slaves[each.key].rendered
}