Skip to content

Commit ac59c47

Browse files
Chore: add table_class option (#106)
* Chore: add table_class option * Auto Format Co-authored-by: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com>
1 parent 927b13f commit ac59c47

File tree

7 files changed

+13
-3
lines changed

7 files changed

+13
-3
lines changed

.github/auto-release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ version-resolver:
1717
- 'bugfix'
1818
- 'bug'
1919
- 'hotfix'
20-
- 'no-release'
2120
default: 'minor'
2221

2322
categories:

.github/renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
":preserveSemverRanges"
55
],
66
"labels": ["auto-update"],
7+
"dependencyDashboardAutoclose": true,
78
"enabledManagers": ["terraform"],
89
"terraform": {
910
"ignorePaths": ["**/context.tf", "examples/**"]
1011
}
1112
}
12-

.github/workflows/validate-codeowners.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
steps:
1111
- name: "Checkout source code at current commit"
1212
uses: actions/checkout@v2
13+
# Leave pinned at 0.7.1 until https://github.com/mszostok/codeowners-validator/issues/173 is resolved
1314
- uses: mszostok/codeowners-validator@v0.7.1
1415
if: github.event.pull_request.head.repo.full_name == github.repository
1516
name: "Full check of CODEOWNERS"

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ Available targets:
304304
| <a name="input_server_side_encryption_kms_key_arn"></a> [server\_side\_encryption\_kms\_key\_arn](#input\_server\_side\_encryption\_kms\_key\_arn) | The ARN of the CMK that should be used for the AWS KMS encryption. This attribute should only be specified if the key is different from the default DynamoDB CMK, alias/aws/dynamodb. | `string` | `null` | no |
305305
| <a name="input_stage"></a> [stage](#input\_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
306306
| <a name="input_stream_view_type"></a> [stream\_view\_type](#input\_stream\_view\_type) | When an item in the table is modified, what information is written to the stream | `string` | `""` | no |
307+
| <a name="input_table_class"></a> [table\_class](#input\_table\_class) | DynamoDB storage class of the table. Can be STANDARD or STANDARD\_INFREQUENT\_ACCESS | `string` | `"STANDARD"` | no |
307308
| <a name="input_tags"></a> [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).<br>Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
308309
| <a name="input_tags_enabled"></a> [tags\_enabled](#input\_tags\_enabled) | Set to `false` to disable tagging. This can be helpful if you're managing tables on dynamodb-local with terraform as it doesn't support tagging. | `bool` | `true` | no |
309310
| <a name="input_tenant"></a> [tenant](#input\_tenant) | ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no |
@@ -491,7 +492,7 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
491492

492493
[![README Footer][readme_footer_img]][readme_footer_link]
493494
[![Beacon][beacon]][website]
494-
495+
<!-- markdownlint-disable -->
495496
[logo]: https://cloudposse.com/logo-300x69.svg
496497
[docs]: https://cpco.io/docs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-dynamodb&utm_content=docs
497498
[website]: https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-dynamodb&utm_content=website
@@ -522,3 +523,4 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
522523
[share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-aws-dynamodb
523524
[share_email]: mailto:?subject=terraform-aws-dynamodb&body=https://github.com/cloudposse/terraform-aws-dynamodb
524525
[beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-aws-dynamodb?pixel&cs=github&cm=readme&an=terraform-aws-dynamodb
526+
<!-- markdownlint-restore -->

docs/terraform.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
| <a name="input_server_side_encryption_kms_key_arn"></a> [server\_side\_encryption\_kms\_key\_arn](#input\_server\_side\_encryption\_kms\_key\_arn) | The ARN of the CMK that should be used for the AWS KMS encryption. This attribute should only be specified if the key is different from the default DynamoDB CMK, alias/aws/dynamodb. | `string` | `null` | no |
7373
| <a name="input_stage"></a> [stage](#input\_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
7474
| <a name="input_stream_view_type"></a> [stream\_view\_type](#input\_stream\_view\_type) | When an item in the table is modified, what information is written to the stream | `string` | `""` | no |
75+
| <a name="input_table_class"></a> [table\_class](#input\_table\_class) | DynamoDB storage class of the table. Can be STANDARD or STANDARD\_INFREQUENT\_ACCESS | `string` | `"STANDARD"` | no |
7576
| <a name="input_tags"></a> [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).<br>Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
7677
| <a name="input_tags_enabled"></a> [tags\_enabled](#input\_tags\_enabled) | Set to `false` to disable tagging. This can be helpful if you're managing tables on dynamodb-local with terraform as it doesn't support tagging. | `bool` | `true` | no |
7778
| <a name="input_tenant"></a> [tenant](#input\_tenant) | ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ resource "aws_dynamodb_table" "default" {
5353
range_key = var.range_key
5454
stream_enabled = length(var.replicas) > 0 ? true : var.enable_streams
5555
stream_view_type = length(var.replicas) > 0 || var.enable_streams ? var.stream_view_type : ""
56+
table_class = var.table_class
5657

5758

5859
server_side_encryption {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,9 @@ variable "tags_enabled" {
168168
default = true
169169
description = "Set to `false` to disable tagging. This can be helpful if you're managing tables on dynamodb-local with terraform as it doesn't support tagging."
170170
}
171+
172+
variable "table_class" {
173+
type = string
174+
default = "STANDARD"
175+
description = "DynamoDB storage class of the table. Can be STANDARD or STANDARD_INFREQUENT_ACCESS"
176+
}

0 commit comments

Comments
 (0)