Fix minor naming inconsistencies in Ignition and CLC data

This commit is contained in:
Dalton Hubble
2018-10-27 16:24:59 -07:00
parent bfa1a679eb
commit 9b405a19b2
6 changed files with 42 additions and 40 deletions

View File

@ -57,8 +57,16 @@ resource "digitalocean_tag" "controllers" {
name = "${var.cluster_name}-controller"
}
# Controller Container Linux Config
data "template_file" "controller_config" {
# Controller Ignition configs
data "ct_config" "controller-ignitions" {
count = "${var.controller_count}"
content = "${element(data.template_file.controller-configs.*.rendered, count.index)}"
pretty_print = false
snippets = ["${var.controller_clc_snippets}"]
}
# Controller Container Linux configs
data "template_file" "controller-configs" {
count = "${var.controller_count}"
template = "${file("${path.module}/cl/controller.yaml.tmpl")}"
@ -85,11 +93,3 @@ data "template_file" "etcds" {
dns_zone = "${var.dns_zone}"
}
}
data "ct_config" "controller-ignitions" {
count = "${var.controller_count}"
content = "${element(data.template_file.controller_config.*.rendered, count.index)}"
pretty_print = false
snippets = ["${var.controller_clc_snippets}"]
}

View File

@ -38,8 +38,15 @@ resource "digitalocean_tag" "workers" {
name = "${var.cluster_name}-worker"
}
# Worker Container Linux Config
data "template_file" "worker_config" {
# Worker Ignition config
data "ct_config" "worker-ignition" {
content = "${data.template_file.worker-config.rendered}"
pretty_print = false
snippets = ["${var.worker_clc_snippets}"]
}
# Worker Container Linux config
data "template_file" "worker-config" {
template = "${file("${path.module}/cl/worker.yaml.tmpl")}"
vars = {
@ -47,9 +54,3 @@ data "template_file" "worker_config" {
cluster_domain_suffix = "${var.cluster_domain_suffix}"
}
}
data "ct_config" "worker-ignition" {
content = "${data.template_file.worker_config.rendered}"
pretty_print = false
snippets = ["${var.worker_clc_snippets}"]
}