Partially revert b7ed6e7bd35cee39a3f65b47e731938c3006b5cd

* Fix change that broke Google Cloud container-linux and
fedora-atomic https://github.com/poseidon/typhoon/pull/224
This commit is contained in:
Dalton Hubble 2018-06-06 23:48:37 -07:00
parent 79260c48f6
commit 6676484490
2 changed files with 16 additions and 16 deletions

View File

@ -71,7 +71,7 @@ data "template_file" "controller_config" {
etcd_domain = "${var.cluster_name}-etcd${count.index}.${var.dns_zone}" etcd_domain = "${var.cluster_name}-etcd${count.index}.${var.dns_zone}"
# etcd0=https://cluster-etcd0.example.com,etcd1=https://cluster-etcd1.example.com,... # etcd0=https://cluster-etcd0.example.com,etcd1=https://cluster-etcd1.example.com,...
etcd_initial_cluster = "${join(",", data.template_file.etcds.*.rendered)}" etcd_initial_cluster = "${join(",", formatlist("%s=https://%s:2380", null_resource.repeat.*.triggers.name, null_resource.repeat.*.triggers.domain))}"
kubeconfig = "${indent(10, module.bootkube.kubeconfig)}" kubeconfig = "${indent(10, module.bootkube.kubeconfig)}"
ssh_authorized_key = "${var.ssh_authorized_key}" ssh_authorized_key = "${var.ssh_authorized_key}"
@ -80,14 +80,14 @@ data "template_file" "controller_config" {
} }
} }
data "template_file" "etcds" { # Horrible hack to generate a Terraform list of a desired length without dependencies.
count = "${var.controller_count}" # Ideal ${repeat("etcd", 3) -> ["etcd", "etcd", "etcd"]}
template = "etcd$${index}=https://$${cluster_name}-etcd$${index}.$${dns_zone}:2380" resource null_resource "repeat" {
count = "${var.controller_count}"
vars { triggers {
index = "${count.index}" name = "etcd${count.index}"
cluster_name = "${var.cluster_name}" domain = "${var.cluster_name}-etcd${count.index}.${var.dns_zone}"
dns_zone = "${var.dns_zone}"
} }
} }

View File

@ -71,7 +71,7 @@ data "template_file" "controller-cloudinit" {
etcd_domain = "${var.cluster_name}-etcd${count.index}.${var.dns_zone}" etcd_domain = "${var.cluster_name}-etcd${count.index}.${var.dns_zone}"
# etcd0=https://cluster-etcd0.example.com,etcd1=https://cluster-etcd1.example.com,... # etcd0=https://cluster-etcd0.example.com,etcd1=https://cluster-etcd1.example.com,...
etcd_initial_cluster = "${join(",", data.template_file.etcds.*.rendered)}" etcd_initial_cluster = "${join(",", formatlist("%s=https://%s:2380", null_resource.repeat.*.triggers.name, null_resource.repeat.*.triggers.domain))}"
kubeconfig = "${indent(6, module.bootkube.kubeconfig)}" kubeconfig = "${indent(6, module.bootkube.kubeconfig)}"
ssh_authorized_key = "${var.ssh_authorized_key}" ssh_authorized_key = "${var.ssh_authorized_key}"
@ -80,13 +80,13 @@ data "template_file" "controller-cloudinit" {
} }
} }
data "template_file" "etcds" { # Horrible hack to generate a Terraform list of a desired length without dependencies.
count = "${var.controller_count}" # Ideal ${repeat("etcd", 3) -> ["etcd", "etcd", "etcd"]}
template = "etcd$${index}=https://$${cluster_name}-etcd$${index}.$${dns_zone}:2380" resource null_resource "repeat" {
count = "${var.controller_count}"
vars { triggers {
index = "${count.index}" name = "etcd${count.index}"
cluster_name = "${var.cluster_name}" domain = "${var.cluster_name}-etcd${count.index}.${var.dns_zone}"
dns_zone = "${var.dns_zone}"
} }
} }