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{} {
|
func flattenParameters(list []*rds.Parameter) []map[string]interface{} {
|
||||||
result := make([]map[string]interface{}, 0, len(list))
|
result := make([]map[string]interface{}, 0, len(list))
|
||||||
for _, i := range list {
|
for _, i := range list {
|
||||||
result = append(result, map[string]interface{}{
|
if i.ParameterName != nil {
|
||||||
"name": strings.ToLower(*i.ParameterName),
|
r := make(map[string]interface{})
|
||||||
"value": strings.ToLower(*i.ParameterValue),
|
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
|
return result
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue