diff --git a/docker/resource_docker_container.go b/docker/resource_docker_container.go index 622238a9..37a316bf 100644 --- a/docker/resource_docker_container.go +++ b/docker/resource_docker_container.go @@ -253,6 +253,14 @@ func resourceDockerContainer() *schema.Resource { Default: "0.0.0.0", Optional: true, ForceNew: true, + StateFunc: func(val interface{}) string { + // Empty IP assignments default to 0.0.0.0 + if val.(string) == "" { + return "0.0.0.0" + } + + return val.(string) + }, }, "protocol": &schema.Schema{