Merge pull request #5921 from ColinHebert/rds_subnet_group_description

provider/aws: DB subnet group description modification
This commit is contained in:
Paul Stack 2016-03-30 18:50:33 -05:00
commit 1801904e36
1 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,6 @@ func resourceAwsDbSubnetGroup() *schema.Resource {
"description": &schema.Schema{ "description": &schema.Schema{
Type: schema.TypeString, Type: schema.TypeString,
Required: true, Required: true,
ForceNew: true,
}, },
"subnet_ids": &schema.Schema{ "subnet_ids": &schema.Schema{
@ -153,7 +152,7 @@ func resourceAwsDbSubnetGroupRead(d *schema.ResourceData, meta interface{}) erro
func resourceAwsDbSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error { func resourceAwsDbSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).rdsconn conn := meta.(*AWSClient).rdsconn
if d.HasChange("subnet_ids") { if d.HasChange("subnet_ids") || d.HasChange("description") {
_, n := d.GetChange("subnet_ids") _, n := d.GetChange("subnet_ids")
if n == nil { if n == nil {
n = new(schema.Set) n = new(schema.Set)
@ -166,8 +165,9 @@ func resourceAwsDbSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) er
} }
_, err := conn.ModifyDBSubnetGroup(&rds.ModifyDBSubnetGroupInput{ _, err := conn.ModifyDBSubnetGroup(&rds.ModifyDBSubnetGroupInput{
DBSubnetGroupName: aws.String(d.Id()), DBSubnetGroupName: aws.String(d.Id()),
SubnetIds: sIds, DBSubnetGroupDescription: aws.String(d.Get("description").(string)),
SubnetIds: sIds,
}) })
if err != nil { if err != nil {