{"action":"created","comment":{"url":"https://api.github.com/repos/hashicorp/terraform/pulls/comments/46493835","id":46493835,"diff_hunk":"@@ -207,6 +215,24 @@ func getPortsElem() *schema.Resource {\n \t}\n }\n \n+func getExtraHostsElem() *schema.Resource {","path":"builtin/providers/docker/resource_docker_container.go","position":19,"original_position":19,"commit_id":"2bc20f680cce2e02e1f9cd2418a25d371f9e43d4","original_commit_id":"2bc20f680cce2e02e1f9cd2418a25d371f9e43d4","user":{"login":"jen20","id":548524,"avatar_url":"https://avatars.githubusercontent.com/u/548524?v=3","gravatar_id":"","url":"https://api.github.com/users/jen20","html_url":"https://github.com/jen20","followers_url":"https://api.github.com/users/jen20/followers","following_url":"https://api.github.com/users/jen20/following{/other_user}","gists_url":"https://api.github.com/users/jen20/gists{/gist_id}","starred_url":"https://api.github.com/users/jen20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jen20/subscriptions","organizations_url":"https://api.github.com/users/jen20/orgs","repos_url":"https://api.github.com/users/jen20/repos","events_url":"https://api.github.com/users/jen20/events{/privacy}","received_events_url":"https://api.github.com/users/jen20/received_events","type":"User","site_admin":false},"body":"There's an example here: https://github.com/hashicorp/terraform/blob/master/builtin/providers/aws/resource_aws_security_group.go#L63-L107","created_at":"2015-12-02T23:39:11Z","updated_at":"2015-12-02T23:39:11Z","html_url":"https://github.com/hashicorp/terraform/pull/3463#discussion_r46493835","pull_request_url":"https://api.github.com/repos/hashicorp/terraform/pulls/3463","_links":{"self":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/comments/46493835"},"html":{"href":"https://github.com/hashicorp/terraform/pull/3463#discussion_r46493835"},"pull_request":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/3463"}}},"pull_request":{"url":"https://api.github.com/repos/hashicorp/terraform/pulls/3463","id":47269542,"html_url":"https://github.com/hashicorp/terraform/pull/3463","diff_url":"https://github.com/hashicorp/terraform/pull/3463.diff","patch_url":"https://github.com/hashicorp/terraform/pull/3463.patch","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/3463","number":3463,"state":"open","locked":false,"title":"provider/docker: Add extra_hosts parameter for containers","user":{"login":"paulbellamy","id":250199,"avatar_url":"https://avatars.githubusercontent.com/u/250199?v=3","gravatar_id":"","url":"https://api.github.com/users/paulbellamy","html_url":"https://github.com/paulbellamy","followers_url":"https://api.github.com/users/paulbellamy/followers","following_url":"https://api.github.com/users/paulbellamy/following{/other_user}","gists_url":"https://api.github.com/users/paulbellamy/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbellamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbellamy/subscriptions","organizations_url":"https://api.github.com/users/paulbellamy/orgs","repos_url":"https://api.github.com/users/paulbellamy/repos","events_url":"https://api.github.com/users/paulbellamy/events{/privacy}","received_events_url":"https://api.github.com/users/paulbellamy/received_events","type":"User","site_admin":false},"body":"Usage, as in:\r\n\r\n```\r\nresource \"docker_container\" \"example\" {\r\n  image = \"alpine\"\r\n  name = \"example\"\r\n  command = [\"cat\", \"/etc/hosts\"]\r\n  extra_hosts = {\r\n    host = \"www.example.com\"\r\n    ip = \"192.168.1.1\"\r\n  }\r\n}\r\n```\r\n\r\nIt's equivalent to the docker command-line `--add-host host:ip` flag, but I've opted for the docker API version (called `ExtraHosts`), as I feel it works better syntactically.","created_at":"2015-10-09T13:09:38Z","updated_at":"2015-12-02T23:39:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ffcfebff0af963647b5a929838dc60910cc01e60","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hashicorp/terraform/pulls/3463/commits","review_comments_url":"https://api.github.com/repos/hashicorp/terraform/pulls/3463/comments","review_comment_url":"https://api.github.com/repos/hashicorp/terraform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/3463/comments","statuses_url":"https://api.github.com/repos/hashicorp/terraform/statuses/2bc20f680cce2e02e1f9cd2418a25d371f9e43d4","head":{"label":"paulbellamy:docker-extra-hosts","ref":"docker-extra-hosts","sha":"2bc20f680cce2e02e1f9cd2418a25d371f9e43d4","user":{"login":"paulbellamy","id":250199,"avatar_url":"https://avatars.githubusercontent.com/u/250199?v=3","gravatar_id":"","url":"https://api.github.com/users/paulbellamy","html_url":"https://github.com/paulbellamy","followers_url":"https://api.github.com/users/paulbellamy/followers","following_url":"https://api.github.com/users/paulbellamy/following{/other_user}","gists_url":"https://api.github.com/users/paulbellamy/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbellamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbellamy/subscriptions","organizations_url":"https://api.github.com/users/paulbellamy/orgs","repos_url":"https://api.github.com/users/paulbellamy/repos","events_url":"https://api.github.com/users/paulbellamy/events{/privacy}","received_events_url":"https://api.github.com/users/paulbellamy/received_events","type":"User","site_admin":false},"repo":{"id":43955640,"name":"terraform","full_name":"paulbellamy/terraform","owner":{"login":"paulbellamy","id":250199,"avatar_url":"https://avatars.githubusercontent.com/u/250199?v=3","gravatar_id":"","url":"https://api.github.com/users/paulbellamy","html_url":"https://github.com/paulbellamy","followers_url":"https://api.github.com/users/paulbellamy/followers","following_url":"https://api.github.com/users/paulbellamy/following{/other_user}","gists_url":"https://api.github.com/users/paulbellamy/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbellamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbellamy/subscriptions","organizations_url":"https://api.github.com/users/paulbellamy/orgs","repos_url":"https://api.github.com/users/paulbellamy/repos","events_url":"https://api.github.com/users/paulbellamy/events{/privacy}","received_events_url":"https://api.github.com/users/paulbellamy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulbellamy/terraform","description":"Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.","fork":true,"url":"https://api.github.com/repos/paulbellamy/terraform","forks_url":"https://api.github.com/repos/paulbellamy/terraform/forks","keys_url":"https://api.github.com/repos/paulbellamy/terraform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulbellamy/terraform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulbellamy/terraform/teams","hooks_url":"https://api.github.com/repos/paulbellamy/terraform/hooks","issue_events_url":"https://api.github.com/repos/paulbellamy/terraform/issues/events{/number}","events_url":"https://api.github.com/repos/paulbellamy/terraform/events","assignees_url":"https://api.github.com/repos/paulbellamy/terraform/assignees{/user}","branches_url":"https://api.github.com/repos/paulbellamy/terraform/branches{/branch}","tags_url":"https://api.github.com/repos/paulbellamy/terraform/tags","blobs_url":"https://api.github.com/repos/paulbellamy/terraform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulbellamy/terraform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulbellamy/terraform/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulbellamy/terraform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulbellamy/terraform/statuses/{sha}","languages_url":"https://api.github.com/repos/paulbellamy/terraform/languages","stargazers_url":"https://api.github.com/repos/paulbellamy/terraform/stargazers","contributors_url":"https://api.github.com/repos/paulbellamy/terraform/contributors","subscribers_url":"https://api.github.com/repos/paulbellamy/terraform/subscribers","subscription_url":"https://api.github.com/repos/paulbellamy/terraform/subscription","commits_url":"https://api.github.com/repos/paulbellamy/terraform/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulbellamy/terraform/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulbellamy/terraform/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulbellamy/terraform/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulbellamy/terraform/contents/{+path}","compare_url":"https://api.github.com/repos/paulbellamy/terraform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulbellamy/terraform/merges","archive_url":"https://api.github.com/repos/paulbellamy/terraform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulbellamy/terraform/downloads","issues_url":"https://api.github.com/repos/paulbellamy/terraform/issues{/number}","pulls_url":"https://api.github.com/repos/paulbellamy/terraform/pulls{/number}","milestones_url":"https://api.github.com/repos/paulbellamy/terraform/milestones{/number}","notifications_url":"https://api.github.com/repos/paulbellamy/terraform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulbellamy/terraform/labels{/name}","releases_url":"https://api.github.com/repos/paulbellamy/terraform/releases{/id}","created_at":"2015-10-09T13:01:58Z","updated_at":"2015-10-09T13:02:04Z","pushed_at":"2015-10-09T13:05:49Z","git_url":"git://github.com/paulbellamy/terraform.git","ssh_url":"git@github.com:paulbellamy/terraform.git","clone_url":"https://github.com/paulbellamy/terraform.git","svn_url":"https://github.com/paulbellamy/terraform","homepage":"http://www.terraform.io","size":29588,"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":"295c9245bbd45f00864b542e4b7abf0ad4cce766","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}","created_at":"2014-03-13T22:25:48Z","updated_at":"2015-12-02T15:38:35Z","pushed_at":"2015-12-02T23:24:53Z","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":"http://www.terraform.io","size":49613,"stargazers_count":3506,"watchers_count":3506,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":856,"mirror_url":null,"open_issues_count":750,"forks":856,"open_issues":750,"watchers":3506,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/3463"},"html":{"href":"https://github.com/hashicorp/terraform/pull/3463"},"issue":{"href":"https://api.github.com/repos/hashicorp/terraform/issues/3463"},"comments":{"href":"https://api.github.com/repos/hashicorp/terraform/issues/3463/comments"},"review_comments":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/3463/comments"},"review_comment":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/3463/commits"},"statuses":{"href":"https://api.github.com/repos/hashicorp/terraform/statuses/2bc20f680cce2e02e1f9cd2418a25d371f9e43d4"}}}}