provider/aws: Add arn attribute for DynamoDB tables
This commit exports the `arn` as well as the `id`, since IAM roles require the full resource name rather than just the table name. I'd even be in favor or having `arn` as the `id` since the <region, tablename> pair is the uniqueness constraint, but this will keep backwards compatibility: http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_CreateTable.html
This commit is contained in:
parent
2cea7c7d0c
commit
cb2d90a7d9
|
@ -283,6 +283,7 @@ func resourceAwsDynamoDbTableCreate(d *schema.ResourceData, meta interface{}) er
|
||||||
} else {
|
} else {
|
||||||
// No error, set ID and return
|
// No error, set ID and return
|
||||||
d.SetId(*output.TableDescription.TableName)
|
d.SetId(*output.TableDescription.TableName)
|
||||||
|
d.Set("arn", *output.TableDescription.TableARN)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,5 +109,6 @@ infinite loop in planning.
|
||||||
|
|
||||||
The following attributes are exported:
|
The following attributes are exported:
|
||||||
|
|
||||||
|
* `arn` - The arn of the table
|
||||||
* `id` - The name of the table
|
* `id` - The name of the table
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue