Skip to content

Commit ee48ced

Browse files
authored
feat: PITR Recovery Period in Days (#99)
1 parent 1ab93ca commit ee48ced

File tree

14 files changed

+28
-17
lines changed

14 files changed

+28
-17
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.0 |
71-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.72.1 |
71+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.98 |
7272

7373
## Providers
7474

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

7979
## Modules
8080

@@ -118,6 +118,7 @@ No modules.
118118
| <a name="input_name"></a> [name](#input\_name) | Name of the DynamoDB table | `string` | `null` | no |
119119
| <a name="input_on_demand_throughput"></a> [on\_demand\_throughput](#input\_on\_demand\_throughput) | Sets the maximum number of read and write units for the specified on-demand table | `any` | `{}` | no |
120120
| <a name="input_point_in_time_recovery_enabled"></a> [point\_in\_time\_recovery\_enabled](#input\_point\_in\_time\_recovery\_enabled) | Whether to enable point-in-time recovery | `bool` | `false` | no |
121+
| <a name="input_point_in_time_recovery_period_in_days"></a> [point\_in\_time\_recovery\_period\_in\_days](#input\_point\_in\_time\_recovery\_period\_in\_days) | Number of preceding days for which continuous backups are taken and maintained. Default 35 | `number` | `null` | no |
121122
| <a name="input_range_key"></a> [range\_key](#input\_range\_key) | The attribute to use as the range (sort) key. Must also be defined as an attribute | `string` | `null` | no |
122123
| <a name="input_read_capacity"></a> [read\_capacity](#input\_read\_capacity) | The number of read units for this table. If the billing\_mode is PROVISIONED, this field should be greater than 0 | `number` | `null` | no |
123124
| <a name="input_replica_regions"></a> [replica\_regions](#input\_replica\_regions) | Region names for creating replicas for a global DynamoDB 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.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.72.1 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.98 |
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 = ">= 5.72.1"
7+
version = ">= 5.98"
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.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.72.1 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.98 |
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 = ">= 5.72.1"
7+
version = ">= 5.98"
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.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.72.1 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.98 |
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) | >= 5.72.1 |
31-
| <a name="provider_aws.euwest2"></a> [aws.euwest2](#provider\_aws.euwest2) | >= 5.72.1 |
30+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.98 |
31+
| <a name="provider_aws.euwest2"></a> [aws.euwest2](#provider\_aws.euwest2) | >= 5.98 |
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 = ">= 5.72.1"
7+
version = ">= 5.98"
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.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.72.1 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.98 |
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 = ">= 5.72.1"
7+
version = ">= 5.98"
88
}
99
random = {
1010
source = "hashicorp/random"

main.tf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ resource "aws_dynamodb_table" "this" {
2626
}
2727

2828
point_in_time_recovery {
29-
enabled = var.point_in_time_recovery_enabled
29+
enabled = var.point_in_time_recovery_enabled
30+
recovery_period_in_days = var.point_in_time_recovery_period_in_days
3031
}
3132

3233
dynamic "attribute" {
@@ -166,7 +167,8 @@ resource "aws_dynamodb_table" "autoscaled" {
166167
}
167168

168169
point_in_time_recovery {
169-
enabled = var.point_in_time_recovery_enabled
170+
enabled = var.point_in_time_recovery_enabled
171+
recovery_period_in_days = var.point_in_time_recovery_period_in_days
170172
}
171173

172174
dynamic "attribute" {
@@ -310,7 +312,8 @@ resource "aws_dynamodb_table" "autoscaled_gsi_ignore" {
310312
}
311313

312314
point_in_time_recovery {
313-
enabled = var.point_in_time_recovery_enabled
315+
enabled = var.point_in_time_recovery_enabled
316+
recovery_period_in_days = var.point_in_time_recovery_period_in_days
314317
}
315318

316319
dynamic "attribute" {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ variable "point_in_time_recovery_enabled" {
5252
default = false
5353
}
5454

55+
variable "point_in_time_recovery_period_in_days" {
56+
description = "Number of preceding days for which continuous backups are taken and maintained. Default 35"
57+
type = number
58+
default = null
59+
}
60+
5561
variable "ttl_enabled" {
5662
description = "Indicates whether ttl is enabled"
5763
type = bool

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 = ">= 5.72.1"
7+
version = ">= 5.98"
88
}
99
}
1010
}

wrappers/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module "wrapper" {
2424
name = try(each.value.name, var.defaults.name, null)
2525
on_demand_throughput = try(each.value.on_demand_throughput, var.defaults.on_demand_throughput, {})
2626
point_in_time_recovery_enabled = try(each.value.point_in_time_recovery_enabled, var.defaults.point_in_time_recovery_enabled, false)
27+
point_in_time_recovery_period_in_days = try(each.value.point_in_time_recovery_period_in_days, var.defaults.point_in_time_recovery_period_in_days, null)
2728
range_key = try(each.value.range_key, var.defaults.range_key, null)
2829
read_capacity = try(each.value.read_capacity, var.defaults.read_capacity, null)
2930
replica_regions = try(each.value.replica_regions, var.defaults.replica_regions, [])

wrappers/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 = ">= 5.72.1"
7+
version = ">= 5.98"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)