fix: treat null user as a no-op (#318)

Closes #317 
Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
This commit is contained in:
dubo-dubon-duponey 2020-11-29 05:39:09 -08:00 committed by GitHub
parent c904efdddc
commit 786c88ea6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -144,6 +144,13 @@ func resourceDockerContainer() *schema.Resource {
Optional: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
DiffSuppressFunc: func(k, oldV, newV string, d *schema.ResourceData) bool {
// treat "" as a no-op, which is Docker's default value
if newV == "" {
newV = oldV
}
return oldV == newV
},
},
"dns": {