diff --git a/service/etcd/main.tf b/service/etcd/main.tf index d096e62..888f9de 100644 --- a/service/etcd/main.tf +++ b/service/etcd/main.tf @@ -64,7 +64,7 @@ data "template_file" "etcd-service" { vars = { hostname = element(local.etcd_hostnames, count.index) - intial_cluster = "${join(",", formatlist("%s=http://%s:2380", local.etcd_hostnames, local.etcd_vpn_ips))}" + initial_cluster = "${join(",", formatlist("%s=http://%s:2380", local.etcd_hostnames, local.etcd_vpn_ips))}" listen_client_urls = "http://${element(local.etcd_vpn_ips, count.index)}:2379" advertise_client_urls = "http://${element(local.etcd_vpn_ips, count.index)}:2379" listen_peer_urls = "http://${element(local.etcd_vpn_ips, count.index)}:2380" @@ -80,14 +80,6 @@ data "template_file" "install" { } } -data "null_data_source" "endpoints" { - depends_on = [null_resource.etcd] - - inputs = { - list = "${join(",", formatlist("http://%s:2379", local.etcd_vpn_ips))}" - } -} - output "endpoints" { - value = "${split(",", data.null_data_source.endpoints.outputs["list"])}" + value = formatlist("http://%s:2379", local.etcd_vpn_ips) } diff --git a/service/etcd/templates/etcd.service b/service/etcd/templates/etcd.service index 9512ad0..64346de 100644 --- a/service/etcd/templates/etcd.service +++ b/service/etcd/templates/etcd.service @@ -9,7 +9,7 @@ ExecStart=/opt/etcd/etcd --name ${hostname} \ --listen-client-urls "${listen_client_urls},http://localhost:2379" \ --advertise-client-urls "${advertise_client_urls}" \ --listen-peer-urls "${listen_peer_urls}" \ - --initial-cluster "${intial_cluster}" \ + --initial-cluster "${initial_cluster}" \ --initial-advertise-peer-urls "${listen_peer_urls}" \ --heartbeat-interval 200 \ --election-timeout 5000