From c9f31c10c2898b7710b3771d8cc57f5232680dae Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 3 Nov 2018 22:11:29 -0700 Subject: [PATCH] data/libvirt: Drop local.hostnames We used to assign both {name}-api and {name}-tnc to the bootstrap and master nodes. But we dropped {name}-tnc in 239373f9 (aws/ELBs: merge tnc with api_internal and cleanup, 2018-09-19, #242). Now that it's just the one entry, the local.hostnames indirection is unecessary complication. --- data/data/libvirt/main.tf | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/data/data/libvirt/main.tf b/data/data/libvirt/main.tf index 3866cd5f068..5dbc893ba41 100644 --- a/data/data/libvirt/main.tf +++ b/data/data/libvirt/main.tf @@ -90,22 +90,15 @@ resource "libvirt_domain" "master" { } } -locals { - "hostnames" = [ - "${var.tectonic_cluster_name}-api", - ] -} - data "libvirt_network_dns_host_template" "bootstrap" { - count = "${length(local.hostnames)}" ip = "${var.tectonic_libvirt_bootstrap_ip}" - hostname = "${local.hostnames[count.index]}" + hostname = "${var.tectonic_cluster_name}-api" } data "libvirt_network_dns_host_template" "masters" { - count = "${var.tectonic_master_count * length(local.hostnames)}" - ip = "${var.tectonic_libvirt_master_ips[count.index / length(local.hostnames)]}" - hostname = "${local.hostnames[count.index % length(local.hostnames)]}" + count = "${var.tectonic_master_count}" + ip = "${var.tectonic_libvirt_master_ips[count.index]}" + hostname = "${var.tectonic_cluster_name}-api" } data "libvirt_network_dns_host_template" "etcds" {