Skip to content

Commit f9faa48

Browse files
authored
feat: Global Table Witness (#111)
1 parent 6e1afc2 commit f9faa48

File tree

14 files changed

+32
-14
lines changed

14 files changed

+32
-14
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ Users of Terragrunt can achieve similar results by using modules provided in the
6868
| Name | Version |
6969
|------|---------|
7070
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
71-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
71+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.22 |
7272

7373
## Providers
7474

7575
| Name | Version |
7676
|------|---------|
77-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.13 |
77+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.22 |
7878

7979
## Modules
8080

@@ -111,6 +111,7 @@ No modules.
111111
| <a name="input_create_table"></a> [create\_table](#input\_create\_table) | Controls if DynamoDB table and associated resources are created | `bool` | `true` | no |
112112
| <a name="input_deletion_protection_enabled"></a> [deletion\_protection\_enabled](#input\_deletion\_protection\_enabled) | Enables deletion protection for table | `bool` | `null` | no |
113113
| <a name="input_global_secondary_indexes"></a> [global\_secondary\_indexes](#input\_global\_secondary\_indexes) | Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc. | `any` | `[]` | no |
114+
| <a name="input_global_table_witness"></a> [global\_table\_witness](#input\_global\_table\_witness) | Witness Region in a Multi-Region Strong Consistency deployment. Note This must be used alongside a single replica with consistency\_mode set to STRONG. Other combinations will fail to provision | <pre>object({<br/> region_name = optional(string)<br/> })</pre> | `null` | no |
114115
| <a name="input_hash_key"></a> [hash\_key](#input\_hash\_key) | The attribute to use as the hash (partition) key. Must also be defined as an attribute | `string` | `null` | no |
115116
| <a name="input_ignore_changes_global_secondary_index"></a> [ignore\_changes\_global\_secondary\_index](#input\_ignore\_changes\_global\_secondary\_index) | Whether to ignore changes lifecycle to global secondary indices, useful for provisioned tables with scaling | `bool` | `false` | no |
116117
| <a name="input_import_table"></a> [import\_table](#input\_import\_table) | Configurations for importing s3 data into a new table. | `any` | `{}` | no |

examples/autoscaling/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) | >= 1.5.7 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.22 |
2424
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |
2525

2626
## Providers

examples/autoscaling/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.13"
7+
version = ">= 6.22"
88
}
99
random = {
1010
source = "hashicorp/random"

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) | >= 1.5.7 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.22 |
2424
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |
2525

2626
## Providers

examples/basic/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.13"
7+
version = ">= 6.22"
88
}
99
random = {
1010
source = "hashicorp/random"

examples/global-tables/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ 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) | >= 1.5.7 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.22 |
2424
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |
2525

2626
## Providers
2727

2828
| Name | Version |
2929
|------|---------|
30-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.13 |
31-
| <a name="provider_aws.euwest2"></a> [aws.euwest2](#provider\_aws.euwest2) | >= 6.13 |
30+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.22 |
31+
| <a name="provider_aws.euwest2"></a> [aws.euwest2](#provider\_aws.euwest2) | >= 6.22 |
3232
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |
3333

3434
## Modules

examples/global-tables/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.13"
7+
version = ">= 6.22"
88
}
99
random = {
1010
source = "hashicorp/random"

examples/s3-import/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) | >= 1.5.7 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.22 |
2424
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |
2525

2626
## Providers

examples/s3-import/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.13"
7+
version = ">= 6.22"
88
}
99
random = {
1010
source = "hashicorp/random"

main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,14 @@ resource "aws_dynamodb_table" "this" {
150150
}
151151
}
152152

153+
dynamic "global_table_witness" {
154+
for_each = var.global_table_witness != null ? [var.global_table_witness] : []
155+
156+
content {
157+
region_name = global_table_witness.value.region_name
158+
}
159+
}
160+
153161
tags = merge(
154162
var.tags,
155163
{

0 commit comments

Comments
 (0)