Skip to content

Commit c0b6ca2

Browse files
authored
feat: Added support for table class (#54)
1 parent 2cd6b15 commit c0b6ca2

File tree

9 files changed

+26
-10
lines changed

9 files changed

+26
-10
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.62.3
3+
rev: v1.72.1
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_validate
@@ -23,7 +23,7 @@ repos:
2323
- '--args=--only=terraform_standard_module_structure'
2424
- '--args=--only=terraform_workspace_remote'
2525
- repo: https://github.com/pre-commit/pre-commit-hooks
26-
rev: v4.1.0
26+
rev: v4.2.0
2727
hooks:
2828
- id: check-merge-conflict
2929
- id: end-of-file-fixer

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
### [1.3.0](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/compare/v1.2.2...v1.3.0) (2022-06-05)
6+
7+
8+
### Features
9+
10+
* Support table class feature ([#48](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/issues/52)) ([f3f11eb](https://github.com/HarriLLC/terraform-aws-dynamodb-table/commit/f3f11eb68a178978178b44d8ec40fc1d7e8d80ad))
11+
512
### [1.2.2](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/compare/v1.2.1...v1.2.2) (2022-01-24)
613

714

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ terraform state mv module.dynamodb_table.aws_dynamodb_table.this module.dynamodb
4747
| Name | Version |
4848
|------|---------|
4949
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.12.6 |
50-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.37 |
50+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.69 |
5151

5252
## Providers
5353

5454
| Name | Version |
5555
|------|---------|
56-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.37 |
56+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.69 |
5757

5858
## Modules
5959

@@ -98,6 +98,7 @@ No modules.
9898
| <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 |
9999
| <a name="input_stream_enabled"></a> [stream\_enabled](#input\_stream\_enabled) | Indicates whether Streams are to be enabled (true) or disabled (false). | `bool` | `false` | no |
100100
| <a name="input_stream_view_type"></a> [stream\_view\_type](#input\_stream\_view\_type) | When an item in the table is modified, StreamViewType determines what information is written to the table's stream. Valid values are KEYS\_ONLY, NEW\_IMAGE, OLD\_IMAGE, NEW\_AND\_OLD\_IMAGES. | `string` | `null` | no |
101+
| <a name="input_table_class"></a> [table\_class](#input\_table\_class) | The storage class of the table. Valid values are STANDARD and STANDARD\_INFREQUENT\_ACCESS | `string` | `null` | no |
101102
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no |
102103
| <a name="input_timeouts"></a> [timeouts](#input\_timeouts) | Updated Terraform resource management timeouts | `map(string)` | <pre>{<br> "create": "10m",<br> "delete": "10m",<br> "update": "60m"<br>}</pre> | no |
103104
| <a name="input_ttl_attribute_name"></a> [ttl\_attribute\_name](#input\_ttl\_attribute\_name) | The name of the table attribute to store the TTL timestamp in | `string` | `""` | no |

examples/basic/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.12.6 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.37 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.69 |
2424
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |
2525

2626
## Providers

examples/basic/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ resource "random_pet" "this" {
99
module "dynamodb_table" {
1010
source = "../../"
1111

12-
name = "my-table-${random_pet.this.id}"
13-
hash_key = "id"
14-
range_key = "title"
12+
name = "my-table-${random_pet.this.id}"
13+
hash_key = "id"
14+
range_key = "title"
15+
table_class = "STANDARD"
1516

1617
attributes = [
1718
{

examples/basic/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_version = ">= 0.12.6"
33

44
required_providers {
5-
aws = ">= 3.37"
5+
aws = ">= 3.69"
66
random = ">= 2.0"
77
}
88
}

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ resource "aws_dynamodb_table" "this" {
99
write_capacity = var.write_capacity
1010
stream_enabled = var.stream_enabled
1111
stream_view_type = var.stream_view_type
12+
table_class = var.table_class
1213

1314
ttl {
1415
enabled = var.ttl_enabled

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,9 @@ variable "autoscaling_indexes" {
155155
type = map(map(string))
156156
default = {}
157157
}
158+
159+
variable "table_class" {
160+
description = "The storage class of the table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS"
161+
type = string
162+
default = null
163+
}

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ terraform {
22
required_version = ">= 0.12.6"
33

44
required_providers {
5-
aws = ">= 3.37"
5+
aws = ">= 3.69"
66
}
77
}

0 commit comments

Comments
 (0)