{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/consul-template/issues/587","repository_url":"https://api.github.com/repos/hashicorp/consul-template","labels_url":"https://api.github.com/repos/hashicorp/consul-template/issues/587/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/consul-template/issues/587/comments","events_url":"https://api.github.com/repos/hashicorp/consul-template/issues/587/events","html_url":"https://github.com/hashicorp/consul-template/issues/587","id":142439842,"number":587,"title":"NodeService does not contain service address","user":{"login":"bmonkman","id":58306,"avatar_url":"https://avatars.githubusercontent.com/u/58306?v=3","gravatar_id":"","url":"https://api.github.com/users/bmonkman","html_url":"https://github.com/bmonkman","followers_url":"https://api.github.com/users/bmonkman/followers","following_url":"https://api.github.com/users/bmonkman/following{/other_user}","gists_url":"https://api.github.com/users/bmonkman/gists{/gist_id}","starred_url":"https://api.github.com/users/bmonkman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmonkman/subscriptions","organizations_url":"https://api.github.com/users/bmonkman/orgs","repos_url":"https://api.github.com/users/bmonkman/repos","events_url":"https://api.github.com/users/bmonkman/events{/privacy}","received_events_url":"https://api.github.com/users/bmonkman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-21T19:02:32Z","updated_at":"2016-03-21T19:06:19Z","closed_at":null,"body":"Hey all. \r\nI noticed that the NodeService struct has only a subset of Service info that does not include the service address. I want to use this when routing from the local host to local containers identified by IP, rather than port. \r\nSince this is not available, instead of being able to use `index (node.services 0).Address` I will have to loop through the services to find the local node and get the address from there, which is quite a bit messier.\r\nI can see why the need for address is a less useful case, but I think containerization will be making it more necessary.\r\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/consul-template/issues/comments/199428785","html_url":"https://github.com/hashicorp/consul-template/issues/587#issuecomment-199428785","issue_url":"https://api.github.com/repos/hashicorp/consul-template/issues/587","id":199428785,"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":"2016-03-21T19:06:19Z","updated_at":"2016-03-21T19:06:19Z","body":"Hi @bmonkman \r\n\r\nThank you for opening an issue, and sorry this is causing problems. The `Address` field will contain the ServiceAddress if the service address is defined, otherwise it falls back to the NodeAddress. If no ServiceAddress is set, it's likely an issue with the way you're registering services in Consul. Can you issue a raw HTTP API query and take a look at the result?"}}