Adding the ARN as an output of the DB Subnet Group

This commit is contained in:
stack72 2015-12-11 12:39:15 +00:00
parent 3330da00b9
commit dec5a27f19
2 changed files with 7 additions and 0 deletions

View File

@ -23,6 +23,11 @@ func resourceAwsDbSubnetGroup() *schema.Resource {
Delete: resourceAwsDbSubnetGroupDelete,
Schema: map[string]*schema.Schema{
"arn": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"name": &schema.Schema{
Type: schema.TypeString,
ForceNew: true,
@ -142,6 +147,7 @@ func resourceAwsDbSubnetGroupRead(d *schema.ResourceData, meta interface{}) erro
if err != nil {
log.Printf("[DEBUG] Error building ARN for DB Subnet Group, not setting Tags for group %s", *subnetGroup.DBSubnetGroupName)
} else {
d.Set("arn", arn)
resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{
ResourceName: aws.String(arn),
})

View File

@ -37,4 +37,5 @@ The following arguments are supported:
The following attributes are exported:
* `id` - The db subnet group name.
* `arn` - The ARN of the db subnet group.