Skip to content

Commit

Permalink
data/libvirt: Drop local.hostnames
Browse files Browse the repository at this point in the history
We used to assign both {name}-api and {name}-tnc to the bootstrap and
master nodes.  But we dropped {name}-tnc in 239373f (aws/ELBs: merge
tnc with api_internal and cleanup, 2018-09-19, openshift#242).  Now that it's
just the one entry, the local.hostnames indirection is unecessary
complication.
  • Loading branch information
wking committed Nov 4, 2018
1 parent 0f78fad commit c9f31c1
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions data/data/libvirt/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit c9f31c1

Please sign in to comment.