{"action":"closed","issue":{"url":"https://api.github.com/repos/hashicorp/consul-template/issues/664","repository_url":"https://api.github.com/repos/hashicorp/consul-template","labels_url":"https://api.github.com/repos/hashicorp/consul-template/issues/664/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/consul-template/issues/664/comments","events_url":"https://api.github.com/repos/hashicorp/consul-template/issues/664/events","html_url":"https://github.com/hashicorp/consul-template/issues/664","id":161777129,"number":664,"title":"Vault address discovery via Consul","user":{"login":"mhurne","id":677354,"avatar_url":"https://avatars.githubusercontent.com/u/677354?v=3","gravatar_id":"","url":"https://api.github.com/users/mhurne","html_url":"https://github.com/mhurne","followers_url":"https://api.github.com/users/mhurne/followers","following_url":"https://api.github.com/users/mhurne/following{/other_user}","gists_url":"https://api.github.com/users/mhurne/gists{/gist_id}","starred_url":"https://api.github.com/users/mhurne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhurne/subscriptions","organizations_url":"https://api.github.com/users/mhurne/orgs","repos_url":"https://api.github.com/users/mhurne/repos","events_url":"https://api.github.com/users/mhurne/events{/privacy}","received_events_url":"https://api.github.com/users/mhurne/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-22T20:24:58Z","updated_at":"2016-06-22T21:48:33Z","closed_at":"2016-06-22T21:48:33Z","body":"Currently, consul-template must be provided with a URL to connect to Vault.\r\n\r\nLet's assume we have two Vault 0.6 nodes configured to use our Consul cluster as both the storage and HA backends. It is my understanding that we can configure consul-template's Vault address as follows:\r\n\r\n```\r\nvault {\r\n  address = \"https://active.vault.service.consul:8200\"\r\n}\r\n```\r\n\r\nIf the active Vault node goes down, how will consul-template behave? Does it perform a DNS lookup each and every time it interacts with Vault, such that it would seamlessly pick up the address of the new Vault leader?\r\n\r\nIf not (and perhaps regardless, as they are somewhat separate concerns), I think it could be interesting to support a more direct integration between consul-template and Consul for discovery of Vault servers. If I've provided consul-template with a Consul address, perhaps it could recognize that I have Vault server(s) due to the \"vault\" service registered in Consul, and could use that knowledge to discover the address(es) of those servers without any additional configuration on my part? If I configured Vault to register itself with Consul under some other service name, perhaps I could override the default assumed by consul-template as well:\r\n\r\n```\r\nvault {\r\n  consul_service = \"hashicorp-vault\"\r\n}\r\n```\r\n\r\nAnd (this brings it full circle), I'd expect discovery of Vault leader changes to be handled seamlessly by consul-template when configured to rely directly on Consul for discovery of the Vault servers."}}
{"actor":{"display_login":"sethvargo"}}