Fix crash

Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
This commit is contained in:
dubo-dubon-duponey 2020-12-01 15:09:09 -08:00
parent 7c01a67dc6
commit c1524bed34
No known key found for this signature in database
GPG key ID: C3B96779C681DA56

View file

@ -221,7 +221,11 @@ func flattenIpamConfigSpec(in []network.IPAMConfig) *schema.Set { // []interface
m["gateway"] = v.Gateway
}
if len(v.AuxAddress) > 0 {
m["aux_address"] = v.AuxAddress
aux := make(map[string]interface{}, len(v.AuxAddress))
for ka, va := range v.AuxAddress {
aux[ka] = va
}
m["aux_address"] = aux
}
out[i] = m
}