provider/aws: Allow DB Parameter group to change in RDS

This commit is contained in:
Clint Shryock 2015-04-01 16:05:19 -05:00
parent 261faaf3d2
commit b31a69fe43
1 changed files with 6 additions and 1 deletions

View File

@ -170,7 +170,6 @@ func resourceAwsDbInstance() *schema.Resource {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
Computed: true, Computed: true,
ForceNew: true,
}, },
"address": &schema.Schema{ "address": &schema.Schema{
@ -456,6 +455,12 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error
req.MultiAZ = aws.Boolean(d.Get("multi_az").(bool)) req.MultiAZ = aws.Boolean(d.Get("multi_az").(bool))
} }
if d.HasChange("parameter_group_name") {
change = true
d.SetPartial("parameter_group_name")
req.DBParameterGroupName = aws.String(d.Get("parameter_group_name").(string))
}
if change { if change {
log.Printf("[DEBUG] DB Instance Modification request: %#v", req) log.Printf("[DEBUG] DB Instance Modification request: %#v", req)
_, err := conn.ModifyDBInstance(req) _, err := conn.ModifyDBInstance(req)