Fix minor naming inconsistencies in Ignition and CLC data
This commit is contained in:
parent
bfa1a679eb
commit
9b405a19b2
|
@ -43,8 +43,16 @@ resource "aws_instance" "controllers" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Controller Container Linux Config
|
# Controller Ignition configs
|
||||||
data "template_file" "controller_config" {
|
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}"
|
count = "${var.controller_count}"
|
||||||
|
|
||||||
template = "${file("${path.module}/cl/controller.yaml.tmpl")}"
|
template = "${file("${path.module}/cl/controller.yaml.tmpl")}"
|
||||||
|
@ -74,10 +82,3 @@ data "template_file" "etcds" {
|
||||||
dns_zone = "${var.dns_zone}"
|
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}"]
|
|
||||||
}
|
|
||||||
|
|
|
@ -65,8 +65,15 @@ resource "aws_launch_configuration" "worker" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Worker Container Linux Config
|
# Worker Ignition config
|
||||||
data "template_file" "worker_config" {
|
data "ct_config" "worker-ignition" {
|
||||||
|
content = "${data.template_file.worker-config.rendered}"
|
||||||
|
pretty_print = false
|
||||||
|
snippets = ["${var.clc_snippets}"]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Worker Container Linux config
|
||||||
|
data "template_file" "worker-config" {
|
||||||
template = "${file("${path.module}/cl/worker.yaml.tmpl")}"
|
template = "${file("${path.module}/cl/worker.yaml.tmpl")}"
|
||||||
|
|
||||||
vars = {
|
vars = {
|
||||||
|
@ -76,9 +83,3 @@ data "template_file" "worker_config" {
|
||||||
cluster_domain_suffix = "${var.cluster_domain_suffix}"
|
cluster_domain_suffix = "${var.cluster_domain_suffix}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data "ct_config" "worker-ignition" {
|
|
||||||
content = "${data.template_file.worker_config.rendered}"
|
|
||||||
pretty_print = false
|
|
||||||
snippets = ["${var.clc_snippets}"]
|
|
||||||
}
|
|
||||||
|
|
|
@ -23,4 +23,3 @@ provider "template" {
|
||||||
provider "tls" {
|
provider "tls" {
|
||||||
version = "~> 1.0"
|
version = "~> 1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ resource "azurerm_virtual_machine_scale_set" "workers" {
|
||||||
os_profile {
|
os_profile {
|
||||||
computer_name_prefix = "${var.name}-worker-"
|
computer_name_prefix = "${var.name}-worker-"
|
||||||
admin_username = "core"
|
admin_username = "core"
|
||||||
custom_data = "${element(data.ct_config.worker-ignitions.*.rendered, count.index)}"
|
custom_data = "${data.ct_config.worker-ignition.rendered}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Azure mandates setting an ssh_key, even though Ignition custom_data handles it too
|
# Azure mandates setting an ssh_key, even though Ignition custom_data handles it too
|
||||||
|
@ -93,14 +93,14 @@ resource "azurerm_autoscale_setting" "workers" {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Worker Ignition configs
|
# Worker Ignition configs
|
||||||
data "ct_config" "worker-ignitions" {
|
data "ct_config" "worker-ignition" {
|
||||||
content = "${data.template_file.worker-configs.rendered}"
|
content = "${data.template_file.worker-config.rendered}"
|
||||||
pretty_print = false
|
pretty_print = false
|
||||||
snippets = ["${var.clc_snippets}"]
|
snippets = ["${var.clc_snippets}"]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Worker Container Linux configs
|
# Worker Container Linux configs
|
||||||
data "template_file" "worker-configs" {
|
data "template_file" "worker-config" {
|
||||||
template = "${file("${path.module}/cl/worker.yaml.tmpl")}"
|
template = "${file("${path.module}/cl/worker.yaml.tmpl")}"
|
||||||
|
|
||||||
vars = {
|
vars = {
|
||||||
|
|
|
@ -57,8 +57,16 @@ resource "digitalocean_tag" "controllers" {
|
||||||
name = "${var.cluster_name}-controller"
|
name = "${var.cluster_name}-controller"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Controller Container Linux Config
|
# Controller Ignition configs
|
||||||
data "template_file" "controller_config" {
|
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}"
|
count = "${var.controller_count}"
|
||||||
|
|
||||||
template = "${file("${path.module}/cl/controller.yaml.tmpl")}"
|
template = "${file("${path.module}/cl/controller.yaml.tmpl")}"
|
||||||
|
@ -85,11 +93,3 @@ data "template_file" "etcds" {
|
||||||
dns_zone = "${var.dns_zone}"
|
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}"]
|
|
||||||
}
|
|
||||||
|
|
|
@ -38,8 +38,15 @@ resource "digitalocean_tag" "workers" {
|
||||||
name = "${var.cluster_name}-worker"
|
name = "${var.cluster_name}-worker"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Worker Container Linux Config
|
# Worker Ignition config
|
||||||
data "template_file" "worker_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")}"
|
template = "${file("${path.module}/cl/worker.yaml.tmpl")}"
|
||||||
|
|
||||||
vars = {
|
vars = {
|
||||||
|
@ -47,9 +54,3 @@ data "template_file" "worker_config" {
|
||||||
cluster_domain_suffix = "${var.cluster_domain_suffix}"
|
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}"]
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue