From a99a2d753f1206960554b497934ef4871c9f7944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Torregrosa=20P=C3=A1ez?= <20774994+pablotp@users.noreply.github.com> Date: Mon, 12 May 2025 13:38:53 +0200 Subject: [PATCH 1/2] feat: Allow ignoring GSI changes --- main.tf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 4302dd5..e55051e 100644 --- a/main.tf +++ b/main.tf @@ -70,7 +70,8 @@ resource "aws_dynamodb_table" "default" { lifecycle { ignore_changes = [ read_capacity, - write_capacity + write_capacity, + global_secondary_index ] } From 0d22a4c064d57cf1f006493f57fefc1ce8635189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Torregrosa=20P=C3=A1ez?= <20774994+pablotp@users.noreply.github.com> Date: Mon, 19 May 2025 10:04:44 +0200 Subject: [PATCH 2/2] docs(README): Add a note about the ignored resources --- README.md | 2 +- variables.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index be12fd3..5b754e6 100644 --- a/README.md +++ b/README.md @@ -239,7 +239,7 @@ See [Terraform types and values](https://www.terraform.io/docs/configuration/exp | [enable\_streams](#input\_enable\_streams) | Enable DynamoDB streams | `bool` | `false` | no | | [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no | | [environment](#input\_environment) | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no | -| [global\_secondary\_index\_map](#input\_global\_secondary\_index\_map) | Additional global secondary indexes in the form of a list of mapped values |
list(object({
hash_key = string
name = string
non_key_attributes = list(string)
projection_type = string
range_key = string
read_capacity = number
write_capacity = number
})) | `[]` | no |
+| [global\_secondary\_index\_map](#input\_global\_secondary\_index\_map) | Additional global secondary indexes in the form of a list of mapped values. list(object({
hash_key = string
name = string
non_key_attributes = list(string)
projection_type = string
range_key = string
read_capacity = number
write_capacity = number
})) | `[]` | no |
| [hash\_key](#input\_hash\_key) | DynamoDB table Hash Key | `string` | n/a | yes |
| [hash\_key\_type](#input\_hash\_key\_type) | Hash Key type, which must be a scalar type: `S`, `N`, or `B` for (S)tring, (N)umber or (B)inary data | `string` | `"S"` | no |
| [id\_length\_limit](#input\_id\_length\_limit) | Limit `id` to this many characters (minimum 6).