Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ Users of Terragrunt can achieve similar results by using modules provided in the
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.22 |

## Providers

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

## Modules

Expand Down Expand Up @@ -111,6 +111,7 @@ No modules.
| <a name="input_create_table"></a> [create\_table](#input\_create\_table) | Controls if DynamoDB table and associated resources are created | `bool` | `true` | no |
| <a name="input_deletion_protection_enabled"></a> [deletion\_protection\_enabled](#input\_deletion\_protection\_enabled) | Enables deletion protection for table | `bool` | `null` | no |
| <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 |
| <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 |
| <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 |
| <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 |
| <a name="input_import_table"></a> [import\_table](#input\_import\_table) | Configurations for importing s3 data into a new table. | `any` | `{}` | no |
Expand Down
2 changes: 1 addition & 1 deletion examples/autoscaling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.22 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers
Expand Down
2 changes: 1 addition & 1 deletion examples/autoscaling/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.13"
version = ">= 6.22"
}
random = {
source = "hashicorp/random"
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.22 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.13"
version = ">= 6.22"
}
random = {
source = "hashicorp/random"
Expand Down
6 changes: 3 additions & 3 deletions examples/global-tables/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Note that this example may create resources which can cost money (AWS Elastic IP
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.22 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers

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

## Modules
Expand Down
2 changes: 1 addition & 1 deletion examples/global-tables/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.13"
version = ">= 6.22"
}
random = {
source = "hashicorp/random"
Expand Down
2 changes: 1 addition & 1 deletion examples/s3-import/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.22 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers
Expand Down
2 changes: 1 addition & 1 deletion examples/s3-import/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.13"
version = ">= 6.22"
}
random = {
source = "hashicorp/random"
Expand Down
8 changes: 8 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@ resource "aws_dynamodb_table" "this" {
}
}

dynamic "global_table_witness" {
for_each = var.global_table_witness != null ? [var.global_table_witness] : []

content {
region_name = global_table_witness.value.region_name
}
}

tags = merge(
var.tags,
{
Expand Down
8 changes: 8 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,11 @@ variable "region" {
type = string
default = null
}

variable "global_table_witness" {
description = "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"
type = object({
region_name = optional(string)
})
default = null
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.13"
version = ">= 6.22"
}
}
}
1 change: 1 addition & 0 deletions wrappers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module "wrapper" {
create_table = try(each.value.create_table, var.defaults.create_table, true)
deletion_protection_enabled = try(each.value.deletion_protection_enabled, var.defaults.deletion_protection_enabled, null)
global_secondary_indexes = try(each.value.global_secondary_indexes, var.defaults.global_secondary_indexes, [])
global_table_witness = try(each.value.global_table_witness, var.defaults.global_table_witness, null)
hash_key = try(each.value.hash_key, var.defaults.hash_key, null)
ignore_changes_global_secondary_index = try(each.value.ignore_changes_global_secondary_index, var.defaults.ignore_changes_global_secondary_index, false)
import_table = try(each.value.import_table, var.defaults.import_table, {})
Expand Down
2 changes: 1 addition & 1 deletion wrappers/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.13"
version = ">= 6.22"
}
}
}