provider/aws: Guard against nil DB Parameter vaules
This commit is contained in:
parent
86882e39ed
commit
d7a73937eb
|
@ -399,10 +399,16 @@ func flattenEcsContainerDefinitions(definitions []*ecs.ContainerDefinition) (str
|
|||
func flattenParameters(list []*rds.Parameter) []map[string]interface{} {
|
||||
result := make([]map[string]interface{}, 0, len(list))
|
||||
for _, i := range list {
|
||||
result = append(result, map[string]interface{}{
|
||||
"name": strings.ToLower(*i.ParameterName),
|
||||
"value": strings.ToLower(*i.ParameterValue),
|
||||
})
|
||||
if i.ParameterName != nil {
|
||||
r := make(map[string]interface{})
|
||||
r["name"] = strings.ToLower(*i.ParameterName)
|
||||
// Default empty string, guard against nil parameter values
|
||||
r["value"] = ""
|
||||
if i.ParameterValue != nil {
|
||||
r["value"] = strings.ToLower(*i.ParameterValue)
|
||||
}
|
||||
result = append(result, r)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue