You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support additional attributes and secondary indexes (#6)
* Added the ability to add additional attributes, and secondary indexes
* Added formatting
* Cleaned up readme file formatting
* switched to terraform-terraform-label for modern sleekness
|`autoscale_min_write_capacity`|`5`| DynamoDB autoscaling min write capacity | No |
48
95
|`autoscale_max_write_capacity`|`20`| DynamoDB autoscaling max write capacity | No |
49
96
|`enable_autoscaler`|`true`| Flag to enable/disable DynamoDB autoscaling | No |
97
+
|`dynamodb_attributes`|`[]`| List of maps, that describe extra DynamoDB attributes | No |
98
+
|`global_secondary_index_map`|`[]`| List of maps, that describes additional secondary index properties | No |
99
+
100
+
101
+
## A note about DynamoDB attributes
102
+
Only define attributes on the table object that are going to be used as:
103
+
104
+
* Table hash key or range key
105
+
* LSI or GSI hash key or range key
106
+
107
+
The DynamoDB API expects attribute structure (name and type) to be 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; 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 object to prevent duplication and increase consistency. If you add attributes here that are not used in these scenarios it can cause an infinite loop in planning.
50
108
109
+
Additional details see [dynamodb_table](https://www.terraform.io/docs/providers/aws/r/dynamodb_table.html)
0 commit comments