mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2026-01-29 09:57:36 -05:00
Normalize a blank string to 0.0.0.0 (#128)
Works around a problem in Windows on Docker, which doesn't support providing an IP to to bind to for ports
This commit is contained in:
parent
1ac859bd81
commit
1c68029ce9
1 changed files with 8 additions and 0 deletions
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Reference in a new issue