Fix implicit map assignments to be explicit

* Terraform v0.12 will require map assignments be explicit,
part of v0.12 readiness
This commit is contained in:
Dalton Hubble
2019-03-12 01:19:54 -07:00
parent 9493ed3b1d
commit 2019177b6b
13 changed files with 25 additions and 25 deletions

View File

@ -5,11 +5,11 @@ resource "matchbox_group" "install" {
name = "${format("fedora-install-%s", element(concat(var.controller_names, var.worker_names), count.index))}"
profile = "${element(matchbox_profile.cached-fedora-install.*.name, count.index)}"
selector {
selector = {
mac = "${element(concat(var.controller_macs, var.worker_macs), count.index)}"
}
metadata {
metadata = {
ssh_authorized_key = "${var.ssh_authorized_key}"
}
}
@ -19,7 +19,7 @@ resource "matchbox_group" "controller" {
name = "${format("%s-%s", var.cluster_name, element(var.controller_names, count.index))}"
profile = "${element(matchbox_profile.controllers.*.name, count.index)}"
selector {
selector = {
mac = "${element(var.controller_macs, count.index)}"
os = "installed"
}
@ -30,7 +30,7 @@ resource "matchbox_group" "worker" {
name = "${format("%s-%s", var.cluster_name, element(var.worker_names, count.index))}"
profile = "${element(matchbox_profile.workers.*.name, count.index)}"
selector {
selector = {
mac = "${element(var.worker_macs, count.index)}"
os = "installed"
}

View File

@ -33,7 +33,7 @@ data "template_file" "install-kickstarts" {
template = "${file("${path.module}/kickstart/fedora-atomic.ks.tmpl")}"
vars {
vars = {
matchbox_http_endpoint = "${var.matchbox_http_endpoint}"
atomic_assets_endpoint = "${local.atomic_assets_endpoint}"
mac = "${element(concat(var.controller_macs, var.worker_macs), count.index)}"
@ -54,7 +54,7 @@ data "template_file" "controller-configs" {
template = "${file("${path.module}/cloudinit/controller.yaml.tmpl")}"
vars {
vars = {
domain_name = "${element(var.controller_domains, count.index)}"
etcd_name = "${element(var.controller_names, count.index)}"
etcd_initial_cluster = "${join(",", formatlist("%s=https://%s:2380", var.controller_names, var.controller_domains))}"
@ -78,7 +78,7 @@ data "template_file" "worker-configs" {
template = "${file("${path.module}/cloudinit/worker.yaml.tmpl")}"
vars {
vars = {
domain_name = "${element(var.worker_domains, count.index)}"
cluster_dns_service_ip = "${module.bootkube.cluster_dns_service_ip}"
cluster_domain_suffix = "${var.cluster_domain_suffix}"