diff --git a/builtin/providers/docker/resource_docker_container.go b/builtin/providers/docker/resource_docker_container.go index 4e61bc2a2..01b2453ad 100644 --- a/builtin/providers/docker/resource_docker_container.go +++ b/builtin/providers/docker/resource_docker_container.go @@ -229,13 +229,13 @@ func resourceDockerContainer() *schema.Resource { Schema: map[string]*schema.Schema{ "ip": &schema.Schema{ Type: schema.TypeString, - Optional: true, + Required: true, ForceNew: true, }, "host": &schema.Schema{ Type: schema.TypeString, - Optional: true, + Required: true, ForceNew: true, }, }, diff --git a/website/source/docs/providers/docker/r/container.html.markdown b/website/source/docs/providers/docker/r/container.html.markdown index 4dbffefd8..4b928c126 100644 --- a/website/source/docs/providers/docker/r/container.html.markdown +++ b/website/source/docs/providers/docker/r/container.html.markdown @@ -63,7 +63,7 @@ The following arguments are supported: kept running. If false, then as long as the container exists, Terraform assumes it is successful. * `ports` - (Optional, block) See [Ports](#ports) below for details. -* `host_entry` - (Optional, block) See [Extra Hosts](#extra_hosts) below for +* `host` - (Optional, block) See [Extra Hosts](#extra_hosts) below for details. * `privileged` - (Optional, bool) Run container in privileged mode. * `publish_all_ports` - (Optional, bool) Publish all ports of the container. @@ -97,12 +97,12 @@ the following: ### Extra Hosts -`host_entry` is a block within the configuration that can be repeated to specify -the extra host mappings for the container. Each `host_entry` block supports +`host` is a block within the configuration that can be repeated to specify +the extra host mappings for the container. Each `host` block supports the following: -* `host` - (Required, int) Hostname to add. -* `ip` - (Required, int) IP address this hostname should resolve to.. +* `host` - (Required, string) Hostname to add. +* `ip` - (Required, string) IP address this hostname should resolve to. This is equivalent to using the `--add-host` option when using the `run` command of the Docker CLI.