Merge pull request #2728 from hashicorp/b-aws-db-param-bug

provider/aws: Fix issue with detecting differences in DB Parameters
This commit is contained in:
Clint 2015-07-20 12:38:17 -05:00
commit 60305cb879
2 changed files with 6 additions and 2 deletions

View File

@ -166,7 +166,7 @@ func resourceAwsDbParameterGroupUpdate(d *schema.ResourceData, meta interface{})
Parameters: parameters,
}
log.Printf("[DEBUG] Modify DB Parameter Group: %#v", modifyOpts)
log.Printf("[DEBUG] Modify DB Parameter Group: %s", modifyOpts)
_, err = rdsconn.ModifyDBParameterGroup(&modifyOpts)
if err != nil {
return fmt.Errorf("Error modifying DB Parameter Group: %s", err)

View File

@ -186,13 +186,17 @@ func expandIPPerms(
// Takes the result of flatmap.Expand for an array of parameters and
// returns Parameter API compatible objects
func expandParameters(configured []interface{}) ([]*rds.Parameter, error) {
parameters := make([]*rds.Parameter, 0, len(configured))
var parameters []*rds.Parameter
// Loop over our configured parameters and create
// an array of aws-sdk-go compatabile objects
for _, pRaw := range configured {
data := pRaw.(map[string]interface{})
if data["name"].(string) == "" {
continue
}
p := &rds.Parameter{
ApplyMethod: aws.String(data["apply_method"].(string)),
ParameterName: aws.String(data["name"].(string)),