Merge pull request #9052 from hashicorp/b-aws-rds-option-group

provider/aws: aws_db_option_group flattenOptions failing due to missing values
This commit is contained in:
Paul Stack 2016-09-28 11:18:28 +01:00 committed by GitHub
commit d4dd615b52
1 changed files with 8 additions and 4 deletions

View File

@ -624,10 +624,14 @@ func flattenOptions(list []*rds.Option) []map[string]interface{} {
if i.OptionSettings != nil {
settings := make([]map[string]interface{}, 0, len(i.OptionSettings))
for _, j := range i.OptionSettings {
settings = append(settings, map[string]interface{}{
"name": *j.Name,
"value": *j.Value,
})
setting := map[string]interface{}{
"name": *j.Name,
}
if j.Value != nil {
setting["value"] = *j.Value
}
settings = append(settings, setting)
}
r["option_settings"] = settings