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:
commit
60305cb879
|
@ -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)
|
||||
|
|
|
@ -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)),
|
||||
|
|
Loading…
Reference in New Issue