Merge pull request #1225 from hashicorp/b-fix-db-parameter-group-cases

provider/aws: Fixes issue 886 in DB Parameter group
This commit is contained in:
Clint 2015-03-18 11:01:04 -05:00
commit fd1514dfaf
1 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import (
"bytes" "bytes"
"fmt" "fmt"
"log" "log"
"strings"
"time" "time"
"github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/hashcode"
@ -220,7 +221,8 @@ func resourceAwsDbParameterHash(v interface{}) int {
var buf bytes.Buffer var buf bytes.Buffer
m := v.(map[string]interface{}) m := v.(map[string]interface{})
buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["name"].(string)))
buf.WriteString(fmt.Sprintf("%s-", m["value"].(string))) // Store the value as a lower case string, to match how we store them in flattenParameters
buf.WriteString(fmt.Sprintf("%s-", strings.ToLower(m["value"].(string))))
return hashcode.String(buf.String()) return hashcode.String(buf.String())
} }