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.9 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |

## Providers

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

## Modules

Expand Down Expand Up @@ -137,6 +137,7 @@ No modules.
| <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 |
| <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 |
| <a name="input_ttl_enabled"></a> [ttl\_enabled](#input\_ttl\_enabled) | Indicates whether ttl is enabled | `bool` | `false` | no |
| <a name="input_warm_throughput"></a> [warm\_throughput](#input\_warm\_throughput) | Sets the number of warm read and write units for the specified table | `any` | `{}` | no |
| <a name="input_write_capacity"></a> [write\_capacity](#input\_write\_capacity) | The number of write units for this table. If the billing\_mode is PROVISIONED, this field should be greater than 0 | `number` | `null` | no |

## Outputs
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.9 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
| <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.9"
version = ">= 6.13"
}
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.9 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
| <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.9"
version = ">= 6.13"
}
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.9 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.9 |
| <a name="provider_aws.euwest2"></a> [aws.euwest2](#provider\_aws.euwest2) | >= 6.9 |
| <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_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.9"
version = ">= 6.13"
}
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.9 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
| <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.9"
version = ">= 6.13"
}
random = {
source = "hashicorp/random"
Expand Down
36 changes: 36 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ resource "aws_dynamodb_table" "this" {
max_write_request_units = try(on_demand_throughput.value.max_write_request_units, null)
}
}

dynamic "warm_throughput" {
for_each = try([global_secondary_index.value.warm_throughput], [])

content {
read_units_per_second = try(warm_throughput.value.read_units_per_second, null)
write_units_per_second = try(warm_throughput.value.write_units_per_second, null)
}
}
}
}

Expand Down Expand Up @@ -132,6 +141,15 @@ resource "aws_dynamodb_table" "this" {
}
}

dynamic "warm_throughput" {
for_each = length(var.warm_throughput) > 0 ? [var.warm_throughput] : []

content {
read_units_per_second = try(warm_throughput.value.read_units_per_second, null)
write_units_per_second = try(warm_throughput.value.write_units_per_second, null)
}
}

tags = merge(
var.tags,
{
Expand Down Expand Up @@ -215,6 +233,15 @@ resource "aws_dynamodb_table" "autoscaled" {
max_write_request_units = try(on_demand_throughput.value.max_write_request_units, null)
}
}

dynamic "warm_throughput" {
for_each = try([global_secondary_index.value.warm_throughput], [])

content {
read_units_per_second = try(warm_throughput.value.read_units_per_second, null)
write_units_per_second = try(warm_throughput.value.write_units_per_second, null)
}
}
}
}

Expand Down Expand Up @@ -275,6 +302,15 @@ resource "aws_dynamodb_table" "autoscaled" {
}
}

dynamic "warm_throughput" {
for_each = length(var.warm_throughput) > 0 ? [var.warm_throughput] : []

content {
read_units_per_second = try(warm_throughput.value.read_units_per_second, null)
write_units_per_second = try(warm_throughput.value.write_units_per_second, null)
}
}

tags = merge(
var.tags,
{
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ variable "on_demand_throughput" {
default = {}
}

variable "warm_throughput" {
description = "Sets the number of warm read and write units for the specified table"
type = any
default = {}
}

variable "restore_date_time" {
description = "Time of the point-in-time recovery point to restore."
type = string
Expand Down
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.9"
version = ">= 6.13"
}
}
}
1 change: 1 addition & 0 deletions wrappers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ module "wrapper" {
})
ttl_attribute_name = try(each.value.ttl_attribute_name, var.defaults.ttl_attribute_name, "")
ttl_enabled = try(each.value.ttl_enabled, var.defaults.ttl_enabled, false)
warm_throughput = try(each.value.warm_throughput, var.defaults.warm_throughput, {})
write_capacity = try(each.value.write_capacity, var.defaults.write_capacity, null)
}
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.9"
version = ">= 6.13"
}
}
}