{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/consul-template/issues/146","labels_url":"https://api.github.com/repos/hashicorp/consul-template/issues/146/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/consul-template/issues/146/comments","events_url":"https://api.github.com/repos/hashicorp/consul-template/issues/146/events","html_url":"https://github.com/hashicorp/consul-template/pull/146","id":54055050,"number":146,"title":"Add \"datacenters\" template function to list datacenters","user":{"login":"ebroder","id":28167,"avatar_url":"https://avatars.githubusercontent.com/u/28167?v=3","gravatar_id":"","url":"https://api.github.com/users/ebroder","html_url":"https://github.com/ebroder","followers_url":"https://api.github.com/users/ebroder/followers","following_url":"https://api.github.com/users/ebroder/following{/other_user}","gists_url":"https://api.github.com/users/ebroder/gists{/gist_id}","starred_url":"https://api.github.com/users/ebroder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebroder/subscriptions","organizations_url":"https://api.github.com/users/ebroder/orgs","repos_url":"https://api.github.com/users/ebroder/repos","events_url":"https://api.github.com/users/ebroder/events{/privacy}","received_events_url":"https://api.github.com/users/ebroder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-12T13:47:57Z","updated_at":"2015-01-12T14:26:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hashicorp/consul-template/pulls/146","html_url":"https://github.com/hashicorp/consul-template/pull/146","diff_url":"https://github.com/hashicorp/consul-template/pull/146.diff","patch_url":"https://github.com/hashicorp/consul-template/pull/146.patch"},"body":"This is decidedly imperfect (see in particular the synthesized `QueryMeta` in `Datacenters.Fetch` - I was mostly just looking for something that would make it run to see if it worked), but I'm curious whether there's interest in a cleaned up version of this function.\r\n\r\nI suspect in practice the utility of a `datacenters` function will be limited by #64, but it seems like an element of the consul catalog that's noticeably missing from the current functionality. Thoughts?"},"comment":{"url":"https://api.github.com/repos/hashicorp/consul-template/issues/comments/69576595","html_url":"https://github.com/hashicorp/consul-template/pull/146#issuecomment-69576595","issue_url":"https://api.github.com/repos/hashicorp/consul-template/issues/146","id":69576595,"user":{"login":"sethvargo","id":408570,"avatar_url":"https://avatars.githubusercontent.com/u/408570?v=3","gravatar_id":"","url":"https://api.github.com/users/sethvargo","html_url":"https://github.com/sethvargo","followers_url":"https://api.github.com/users/sethvargo/followers","following_url":"https://api.github.com/users/sethvargo/following{/other_user}","gists_url":"https://api.github.com/users/sethvargo/gists{/gist_id}","starred_url":"https://api.github.com/users/sethvargo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethvargo/subscriptions","organizations_url":"https://api.github.com/users/sethvargo/orgs","repos_url":"https://api.github.com/users/sethvargo/repos","events_url":"https://api.github.com/users/sethvargo/events{/privacy}","received_events_url":"https://api.github.com/users/sethvargo/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T14:26:05Z","updated_at":"2015-01-12T14:26:05Z","body":"Hey @ebroder \r\n\r\nThank you for the PR! This looks really good. I'm going to defer to @armon, but my initial thought is \"can I see a real-life use case\". You are totally right that #64 is going to make this a blocker, but assuming 64 wasn't a thing, can you provide a \"real-life\" use case for when you would use this functionality? What would the in and out templates look like?"}}