mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge pull request #2924 from calvinfo/f-aws-dynamo-arn
provider/aws: Add arn attribute for DynamoDB tables
This commit is contained in:
commit
b779144a1e
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ The following arguments are supported:
|
|||||||
* `type` - One of: S, N, or B for (S)tring, (N)umber or (B)inary data
|
* `type` - One of: S, N, or B for (S)tring, (N)umber or (B)inary data
|
||||||
* `local_secondary_index` - (Optional) Describe an LSI on the table;
|
* `local_secondary_index` - (Optional) Describe an LSI on the table;
|
||||||
these can only be allocated *at creation* so you cannot change this
|
these can only be allocated *at creation* so you cannot change this
|
||||||
definition after you have created the resource.
|
definition after you have created the resource.
|
||||||
* `global_secondary_index` - (Optional) Describe a GSO for the table;
|
* `global_secondary_index` - (Optional) Describe a GSO for the table;
|
||||||
subject to the normal limits on the number of GSIs, projected
|
subject to the normal limits on the number of GSIs, projected
|
||||||
attributes, etc.
|
attributes, etc.
|
||||||
@ -79,10 +79,10 @@ the following properties are supported:
|
|||||||
where *ALL* projects every attribute into the index, *KEYS_ONLY*
|
where *ALL* projects every attribute into the index, *KEYS_ONLY*
|
||||||
projects just the hash and range key into the index, and *INCLUDE*
|
projects just the hash and range key into the index, and *INCLUDE*
|
||||||
projects only the keys specified in the _non_key_attributes_
|
projects only the keys specified in the _non_key_attributes_
|
||||||
parameter.
|
parameter.
|
||||||
* `non_key_attributes` - (Optional) Only required with *INCLUDE* as a
|
* `non_key_attributes` - (Optional) Only required with *INCLUDE* as a
|
||||||
projection type; a list of attributes to project into the index. These
|
projection type; a list of attributes to project into the index. These
|
||||||
do not need to be defined as attributes on the table.
|
do not need to be defined as attributes on the table.
|
||||||
|
|
||||||
For `global_secondary_index` objects only, you need to specify
|
For `global_secondary_index` objects only, you need to specify
|
||||||
`write_capacity` and `read_capacity` in the same way you would for the
|
`write_capacity` and `read_capacity` in the same way you would for the
|
||||||
@ -95,13 +95,13 @@ Only define attributes on the table object that are going to be used as:
|
|||||||
* Table hash key or range key
|
* Table hash key or range key
|
||||||
* LSI or GSI hash key or range key
|
* LSI or GSI hash key or range key
|
||||||
|
|
||||||
The DynamoDB API expects attribute structure (name and type) to be
|
The DynamoDB API expects attribute structure (name and type) to be
|
||||||
passed along when creating or updating GSI/LSIs or creating the initial
|
passed along when creating or updating GSI/LSIs or creating the initial
|
||||||
table. In these cases it expects the Hash / Range keys to be provided;
|
table. In these cases it expects the Hash / Range keys to be provided;
|
||||||
because these get re-used in numerous places (i.e the table's range key
|
because these get re-used in numerous places (i.e the table's range key
|
||||||
could be a part of one or more GSIs), they are stored on the table
|
could be a part of one or more GSIs), they are stored on the table
|
||||||
object to prevent duplication and increase consistency. If you add
|
object to prevent duplication and increase consistency. If you add
|
||||||
attributes here that are not used in these scenarios it can cause an
|
attributes here that are not used in these scenarios it can cause an
|
||||||
infinite loop in planning.
|
infinite loop in planning.
|
||||||
|
|
||||||
|
|
||||||
@ -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
Block a user