{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/3463","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/3463/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/3463/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/3463/events","html_url":"https://github.com/hashicorp/terraform/pull/3463","id":110655897,"number":3463,"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},"labels":[{"url":"https://api.github.com/repos/hashicorp/terraform/labels/enhancement","name":"enhancement","color":"d4c5f9"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/docker","name":"provider/docker","color":"bfdadc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-09T13:09:38Z","updated_at":"2016-01-15T03:08:33Z","closed_at":"2016-01-15T03:07:24Z","pull_request":{"url":"https://api.github.com/repos/hashicorp/terraform/pulls/3463","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"},"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."},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/171856829","html_url":"https://github.com/hashicorp/terraform/pull/3463#issuecomment-171856829","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/3463","id":171856829,"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},"created_at":"2016-01-15T03:08:33Z","updated_at":"2016-01-15T03:08:33Z","body":"Thanks @paulbellamy! I pulled this locally and added some acceptance tests. The only other change I made was to rename `hosts` to `host` in the schema - which reads more naturally when you define more than one of them. I'll go back shortly and look at whether everything else in the docker provider matches that pattern also. Thanks for the contribution - sorry it took so long to merge!"}}