Merge pull request #5921 from ColinHebert/rds_subnet_group_description
provider/aws: DB subnet group description modification
This commit is contained in:
commit
1801904e36
|
@ -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)
|
||||||
|
@ -167,6 +166,7 @@ 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()),
|
||||||
|
DBSubnetGroupDescription: aws.String(d.Get("description").(string)),
|
||||||
SubnetIds: sIds,
|
SubnetIds: sIds,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue