Skip to content

Commit

Permalink
Merge pull request #607 from wking/libvirt-hostname-simplification
Browse files Browse the repository at this point in the history
data/libvirt: Drop local.hostnames
  • Loading branch information
openshift-merge-robot committed Nov 4, 2018
2 parents 1c66a54 + c9f31c1 commit 59ebab0
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 59ebab0

Please sign in to comment.