mirror of
https://github.com/puppetmaster/typhoon.git
synced 2025-07-22 02:01:34 +02:00
Template etcd_servers list to replace null_resource.repeat
* Remove the last usage of null_resource.repeat, which has always been an eyesore for creating the etcd server list * Originally, #224 switched to templating the etcd_servers list for all clouds, but had to revert on GCP in #237 * https://github.com/poseidon/typhoon/pull/224 * https://github.com/poseidon/typhoon/pull/237
This commit is contained in:
@ -28,7 +28,7 @@ resource "google_compute_instance_template" "worker" {
|
||||
machine_type = "${var.machine_type}"
|
||||
|
||||
metadata {
|
||||
user-data = "${data.ct_config.worker_ign.rendered}"
|
||||
user-data = "${data.ct_config.worker-ignition.rendered}"
|
||||
}
|
||||
|
||||
scheduling {
|
||||
@ -64,8 +64,15 @@ resource "google_compute_instance_template" "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.clc_snippets}"]
|
||||
}
|
||||
|
||||
# Worker Container Linux config
|
||||
data "template_file" "worker-config" {
|
||||
template = "${file("${path.module}/cl/worker.yaml.tmpl")}"
|
||||
|
||||
vars = {
|
||||
@ -75,9 +82,3 @@ data "template_file" "worker_config" {
|
||||
cluster_domain_suffix = "${var.cluster_domain_suffix}"
|
||||
}
|
||||
}
|
||||
|
||||
data "ct_config" "worker_ign" {
|
||||
content = "${data.template_file.worker_config.rendered}"
|
||||
pretty_print = false
|
||||
snippets = ["${var.clc_snippets}"]
|
||||
}
|
||||
|
Reference in New Issue
Block a user