Merge pull request #4261 from stack72/aws-db_subnet_group-arn

provider/aws: DB Subnet group arn output
This commit is contained in:
Clint 2015-12-11 08:34:05 -06:00
commit 991d58c6d2
2 changed files with 7 additions and 0 deletions

View File

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

View File

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