From dec5a27f19661cba845173fed494b9a14906cacb Mon Sep 17 00:00:00 2001 From: stack72 Date: Fri, 11 Dec 2015 12:39:15 +0000 Subject: [PATCH] Adding the ARN as an output of the DB Subnet Group --- builtin/providers/aws/resource_aws_db_subnet_group.go | 6 ++++++ .../docs/providers/aws/r/db_subnet_group.html.markdown | 1 + 2 files changed, 7 insertions(+) diff --git a/builtin/providers/aws/resource_aws_db_subnet_group.go b/builtin/providers/aws/resource_aws_db_subnet_group.go index cbfed609a..0127cfd48 100644 --- a/builtin/providers/aws/resource_aws_db_subnet_group.go +++ b/builtin/providers/aws/resource_aws_db_subnet_group.go @@ -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), }) diff --git a/website/source/docs/providers/aws/r/db_subnet_group.html.markdown b/website/source/docs/providers/aws/r/db_subnet_group.html.markdown index e3dcd18ed..1a539ffa2 100644 --- a/website/source/docs/providers/aws/r/db_subnet_group.html.markdown +++ b/website/source/docs/providers/aws/r/db_subnet_group.html.markdown @@ -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.