{"action":"created","comment":{"url":"https://api.github.com/repos/hashicorp/terraform/pulls/comments/70281417","id":70281417,"diff_hunk":"@@ -0,0 +1,17 @@\n+package shared\n+\n+import (\n+\t\"fmt\"\n+\t\"net\"\n+)\n+\n+// IpFormat formats the IP correctly, so we don't provide IPv6 address in an IPv4 format during node communication. We return the ip parameter as is if it's an IPv4 address or a hostname.\n+func IpFormat(ip string) string {\n+\tipObj := net.ParseIP(ip)\n+\t// Return the ip/host as is if it's either a hostname or an IPv4 address.\n+\tif ipObj == nil || ipObj.To4() != nil {\n+\t\treturn ip\n+\t}\n+\n+\treturn fmt.Sprintf(\"[%s]\", ip)","path":"communicator/shared/shared.go","position":16,"original_position":16,"commit_id":"309b814d2bfac4dfdcc5c8275d0b6bc9faba7593","original_commit_id":"309b814d2bfac4dfdcc5c8275d0b6bc9faba7593","user":{"login":"jtopjian","id":46959,"avatar_url":"https://avatars.githubusercontent.com/u/46959?v=3","gravatar_id":"","url":"https://api.github.com/users/jtopjian","html_url":"https://github.com/jtopjian","followers_url":"https://api.github.com/users/jtopjian/followers","following_url":"https://api.github.com/users/jtopjian/following{/other_user}","gists_url":"https://api.github.com/users/jtopjian/gists{/gist_id}","starred_url":"https://api.github.com/users/jtopjian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtopjian/subscriptions","organizations_url":"https://api.github.com/users/jtopjian/orgs","repos_url":"https://api.github.com/users/jtopjian/repos","events_url":"https://api.github.com/users/jtopjian/events{/privacy}","received_events_url":"https://api.github.com/users/jtopjian/received_events","type":"User","site_admin":false},"body":"Just to confirm: if the address already has brackets, `net.ParseIP` will return nil, the address will be returned as-is, and used as the connection address?","created_at":"2016-07-11T15:35:14Z","updated_at":"2016-07-11T15:35:14Z","html_url":"https://github.com/hashicorp/terraform/pull/6616#discussion_r70281417","pull_request_url":"https://api.github.com/repos/hashicorp/terraform/pulls/6616","_links":{"self":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/comments/70281417"},"html":{"href":"https://github.com/hashicorp/terraform/pull/6616#discussion_r70281417"},"pull_request":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/6616"}}},"pull_request":{"url":"https://api.github.com/repos/hashicorp/terraform/pulls/6616","id":69695399,"html_url":"https://github.com/hashicorp/terraform/pull/6616","diff_url":"https://github.com/hashicorp/terraform/pull/6616.diff","patch_url":"https://github.com/hashicorp/terraform/pull/6616.patch","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/6616","number":6616,"state":"open","locked":false,"title":"IPv6 support for the communicator.","user":{"login":"kristinn","id":638391,"avatar_url":"https://avatars.githubusercontent.com/u/638391?v=3","gravatar_id":"","url":"https://api.github.com/users/kristinn","html_url":"https://github.com/kristinn","followers_url":"https://api.github.com/users/kristinn/followers","following_url":"https://api.github.com/users/kristinn/following{/other_user}","gists_url":"https://api.github.com/users/kristinn/gists{/gist_id}","starred_url":"https://api.github.com/users/kristinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristinn/subscriptions","organizations_url":"https://api.github.com/users/kristinn/orgs","repos_url":"https://api.github.com/users/kristinn/repos","events_url":"https://api.github.com/users/kristinn/events{/privacy}","received_events_url":"https://api.github.com/users/kristinn/received_events","type":"User","site_admin":false},"body":"Now you can provision machines over IPv6.","created_at":"2016-05-11T15:45:58Z","updated_at":"2016-07-11T15:35:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84189b3973f8c30fae80eb0914f8d80c7259da63","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/hashicorp/terraform/pulls/6616/commits","review_comments_url":"https://api.github.com/repos/hashicorp/terraform/pulls/6616/comments","review_comment_url":"https://api.github.com/repos/hashicorp/terraform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/6616/comments","statuses_url":"https://api.github.com/repos/hashicorp/terraform/statuses/309b814d2bfac4dfdcc5c8275d0b6bc9faba7593","head":{"label":"kristinn:communicator-ipv6-support","ref":"communicator-ipv6-support","sha":"309b814d2bfac4dfdcc5c8275d0b6bc9faba7593","user":{"login":"kristinn","id":638391,"avatar_url":"https://avatars.githubusercontent.com/u/638391?v=3","gravatar_id":"","url":"https://api.github.com/users/kristinn","html_url":"https://github.com/kristinn","followers_url":"https://api.github.com/users/kristinn/followers","following_url":"https://api.github.com/users/kristinn/following{/other_user}","gists_url":"https://api.github.com/users/kristinn/gists{/gist_id}","starred_url":"https://api.github.com/users/kristinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristinn/subscriptions","organizations_url":"https://api.github.com/users/kristinn/orgs","repos_url":"https://api.github.com/users/kristinn/repos","events_url":"https://api.github.com/users/kristinn/events{/privacy}","received_events_url":"https://api.github.com/users/kristinn/received_events","type":"User","site_admin":false},"repo":{"id":40661650,"name":"terraform","full_name":"kristinn/terraform","owner":{"login":"kristinn","id":638391,"avatar_url":"https://avatars.githubusercontent.com/u/638391?v=3","gravatar_id":"","url":"https://api.github.com/users/kristinn","html_url":"https://github.com/kristinn","followers_url":"https://api.github.com/users/kristinn/followers","following_url":"https://api.github.com/users/kristinn/following{/other_user}","gists_url":"https://api.github.com/users/kristinn/gists{/gist_id}","starred_url":"https://api.github.com/users/kristinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristinn/subscriptions","organizations_url":"https://api.github.com/users/kristinn/orgs","repos_url":"https://api.github.com/users/kristinn/repos","events_url":"https://api.github.com/users/kristinn/events{/privacy}","received_events_url":"https://api.github.com/users/kristinn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kristinn/terraform","description":"Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.","fork":true,"url":"https://api.github.com/repos/kristinn/terraform","forks_url":"https://api.github.com/repos/kristinn/terraform/forks","keys_url":"https://api.github.com/repos/kristinn/terraform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kristinn/terraform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kristinn/terraform/teams","hooks_url":"https://api.github.com/repos/kristinn/terraform/hooks","issue_events_url":"https://api.github.com/repos/kristinn/terraform/issues/events{/number}","events_url":"https://api.github.com/repos/kristinn/terraform/events","assignees_url":"https://api.github.com/repos/kristinn/terraform/assignees{/user}","branches_url":"https://api.github.com/repos/kristinn/terraform/branches{/branch}","tags_url":"https://api.github.com/repos/kristinn/terraform/tags","blobs_url":"https://api.github.com/repos/kristinn/terraform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kristinn/terraform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kristinn/terraform/git/refs{/sha}","trees_url":"https://api.github.com/repos/kristinn/terraform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kristinn/terraform/statuses/{sha}","languages_url":"https://api.github.com/repos/kristinn/terraform/languages","stargazers_url":"https://api.github.com/repos/kristinn/terraform/stargazers","contributors_url":"https://api.github.com/repos/kristinn/terraform/contributors","subscribers_url":"https://api.github.com/repos/kristinn/terraform/subscribers","subscription_url":"https://api.github.com/repos/kristinn/terraform/subscription","commits_url":"https://api.github.com/repos/kristinn/terraform/commits{/sha}","git_commits_url":"https://api.github.com/repos/kristinn/terraform/git/commits{/sha}","comments_url":"https://api.github.com/repos/kristinn/terraform/comments{/number}","issue_comment_url":"https://api.github.com/repos/kristinn/terraform/issues/comments{/number}","contents_url":"https://api.github.com/repos/kristinn/terraform/contents/{+path}","compare_url":"https://api.github.com/repos/kristinn/terraform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kristinn/terraform/merges","archive_url":"https://api.github.com/repos/kristinn/terraform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kristinn/terraform/downloads","issues_url":"https://api.github.com/repos/kristinn/terraform/issues{/number}","pulls_url":"https://api.github.com/repos/kristinn/terraform/pulls{/number}","milestones_url":"https://api.github.com/repos/kristinn/terraform/milestones{/number}","notifications_url":"https://api.github.com/repos/kristinn/terraform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kristinn/terraform/labels{/name}","releases_url":"https://api.github.com/repos/kristinn/terraform/releases{/id}","deployments_url":"https://api.github.com/repos/kristinn/terraform/deployments","created_at":"2015-08-13T13:58:41Z","updated_at":"2016-01-11T17:28:36Z","pushed_at":"2016-07-11T11:40:21Z","git_url":"git://github.com/kristinn/terraform.git","ssh_url":"git@github.com:kristinn/terraform.git","clone_url":"https://github.com/kristinn/terraform.git","svn_url":"https://github.com/kristinn/terraform","homepage":"http://www.terraform.io","size":49750,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hashicorp:master","ref":"master","sha":"ac2d195cc56097e23cba49348d61e0df1a0c6f0d","user":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":17728164,"name":"terraform","full_name":"hashicorp/terraform","owner":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashicorp/terraform","description":"Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.","fork":false,"url":"https://api.github.com/repos/hashicorp/terraform","forks_url":"https://api.github.com/repos/hashicorp/terraform/forks","keys_url":"https://api.github.com/repos/hashicorp/terraform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/terraform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/terraform/teams","hooks_url":"https://api.github.com/repos/hashicorp/terraform/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/terraform/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/terraform/events","assignees_url":"https://api.github.com/repos/hashicorp/terraform/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/terraform/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/terraform/tags","blobs_url":"https://api.github.com/repos/hashicorp/terraform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/terraform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/terraform/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/terraform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/terraform/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/terraform/languages","stargazers_url":"https://api.github.com/repos/hashicorp/terraform/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/terraform/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/terraform/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/terraform/subscription","commits_url":"https://api.github.com/repos/hashicorp/terraform/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/terraform/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/terraform/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/terraform/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/terraform/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/terraform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/terraform/merges","archive_url":"https://api.github.com/repos/hashicorp/terraform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/terraform/downloads","issues_url":"https://api.github.com/repos/hashicorp/terraform/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/terraform/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/terraform/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/terraform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/terraform/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/terraform/releases{/id}","deployments_url":"https://api.github.com/repos/hashicorp/terraform/deployments","created_at":"2014-03-13T22:25:48Z","updated_at":"2016-07-11T11:02:45Z","pushed_at":"2016-07-11T15:17:25Z","git_url":"git://github.com/hashicorp/terraform.git","ssh_url":"git@github.com:hashicorp/terraform.git","clone_url":"https://github.com/hashicorp/terraform.git","svn_url":"https://github.com/hashicorp/terraform","homepage":"https://www.terraform.io/","size":98292,"stargazers_count":5136,"watchers_count":5136,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1600,"mirror_url":null,"open_issues_count":1435,"forks":1600,"open_issues":1435,"watchers":5136,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/6616"},"html":{"href":"https://github.com/hashicorp/terraform/pull/6616"},"issue":{"href":"https://api.github.com/repos/hashicorp/terraform/issues/6616"},"comments":{"href":"https://api.github.com/repos/hashicorp/terraform/issues/6616/comments"},"review_comments":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/6616/comments"},"review_comment":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/6616/commits"},"statuses":{"href":"https://api.github.com/repos/hashicorp/terraform/statuses/309b814d2bfac4dfdcc5c8275d0b6bc9faba7593"}}}}
{"actor":{"display_login":"jtopjian"}}