From 6d2fee9c28831251aace76ea8f5653ba0c5510b1 Mon Sep 17 00:00:00 2001 From: stack72 Date: Wed, 14 Oct 2015 18:06:09 +0100 Subject: [PATCH 1/2] After the DynamoDB table is created, the ARN wasn't being set --- builtin/providers/aws/resource_aws_dynamodb_table.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builtin/providers/aws/resource_aws_dynamodb_table.go b/builtin/providers/aws/resource_aws_dynamodb_table.go index df043ffe0..b322ad897 100644 --- a/builtin/providers/aws/resource_aws_dynamodb_table.go +++ b/builtin/providers/aws/resource_aws_dynamodb_table.go @@ -287,6 +287,10 @@ func resourceAwsDynamoDbTableCreate(d *schema.ResourceData, meta interface{}) er } else { // No error, set ID and return d.SetId(*output.TableDescription.TableName) + if err := d.Set("arn", *output.TableDescription.TableArn); err != nil { + return err + } + return nil } } From 7af484c8f6e9aca7792877a55655c68351fb5910 Mon Sep 17 00:00:00 2001 From: stack72 Date: Wed, 14 Oct 2015 19:16:58 +0100 Subject: [PATCH 2/2] Changing the DynamoDb Create to do a Read at the end --- builtin/providers/aws/resource_aws_dynamodb_table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_dynamodb_table.go b/builtin/providers/aws/resource_aws_dynamodb_table.go index b322ad897..c88f50d8a 100644 --- a/builtin/providers/aws/resource_aws_dynamodb_table.go +++ b/builtin/providers/aws/resource_aws_dynamodb_table.go @@ -291,7 +291,7 @@ func resourceAwsDynamoDbTableCreate(d *schema.ResourceData, meta interface{}) er return err } - return nil + return resourceAwsDynamoDbTableRead(d, meta) } }