Merge pull request #6687 from hashicorp/b-aws-elasticache-param-crash

provider/aws: Fix crash in ElastiCache param group
This commit is contained in:
James Nugent 2016-05-17 12:38:34 -05:00
commit b08d741eb0
1 changed files with 6 additions and 4 deletions

View File

@ -645,10 +645,12 @@ func flattenRedshiftParameters(list []*redshift.Parameter) []map[string]interfac
func flattenElastiCacheParameters(list []*elasticache.Parameter) []map[string]interface{} { func flattenElastiCacheParameters(list []*elasticache.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.ParameterValue != nil {
"name": strings.ToLower(*i.ParameterName), result = append(result, map[string]interface{}{
"value": strings.ToLower(*i.ParameterValue), "name": strings.ToLower(*i.ParameterName),
}) "value": strings.ToLower(*i.ParameterValue),
})
}
} }
return result return result
} }