From fccdce9b93749a5bf54116f32a722053c8c81213 Mon Sep 17 00:00:00 2001 From: David Moran <23364162+wavemoran@users.noreply.github.com> Date: Thu, 18 Sep 2025 15:19:07 -0700 Subject: [PATCH 1/3] feat: expose restore_to_point_in_time var --- src/cluster-regional.tf | 1 + src/variables.tf | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/cluster-regional.tf b/src/cluster-regional.tf index a914f1e..f40c025 100644 --- a/src/cluster-regional.tf +++ b/src/cluster-regional.tf @@ -49,6 +49,7 @@ module "aurora_postgres_cluster" { autoscaling_max_capacity = var.autoscaling_max_capacity scaling_configuration = var.scaling_configuration serverlessv2_scaling_configuration = var.serverlessv2_scaling_configuration + restore_to_point_in_time = var.restore_to_point_in_time skip_final_snapshot = var.skip_final_snapshot deletion_protection = var.deletion_protection snapshot_identifier = var.snapshot_identifier diff --git a/src/variables.tf b/src/variables.tf index 6992e19..fdc9adb 100644 --- a/src/variables.tf +++ b/src/variables.tf @@ -335,6 +335,28 @@ variable "serverlessv2_scaling_configuration" { description = "Nested attribute with scaling properties for ServerlessV2. Only valid when `engine_mode` is set to `provisioned.` This is required for Serverless v2" } +variable "restore_to_point_in_time" { + type = list(object({ + source_cluster_identifier = string + restore_type = optional(string, "copy-on-write") + use_latest_restorable_time = optional(bool, true) + restore_to_time = optional(string, null) + })) + default = [] + description = <<-EOT + List of point-in-time recovery options. Valid parameters are: + + `source_cluster_identifier` + Identifier of the source database cluster from which to restore. + `restore_type`: + Type of restore to be performed. Valid options are "full-copy" and "copy-on-write". + `use_latest_restorable_time`: + Set to true to restore the database cluster to the latest restorable backup time. Conflicts with `restore_to_time`. + `restore_to_time`: + Date and time in UTC format to restore the database cluster to. Conflicts with `use_latest_restorable_time`. +EOT +} + variable "intra_security_group_traffic_enabled" { type = bool default = false From 0398385697b51a0e616d6d70a032ce2f68aa3e38 Mon Sep 17 00:00:00 2001 From: David Moran <23364162+wavemoran@users.noreply.github.com> Date: Thu, 18 Sep 2025 15:32:03 -0700 Subject: [PATCH 2/3] update docs --- src/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/README.md b/src/README.md index f9ddef2..b3d847f 100644 --- a/src/README.md +++ b/src/README.md @@ -353,6 +353,7 @@ components: | [reader\_dns\_name\_part](#input\_reader\_dns\_name\_part) | Part of DNS name added to module and cluster name for DNS for cluster reader | `string` | `"reader"` | no | | [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.
Characters matching the regex will be removed from the ID elements.
If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no | | [region](#input\_region) | AWS Region | `string` | n/a | yes | +| [restore\_to\_point\_in\_time](#input\_restore\_to\_point\_in\_time) | List of point-in-time recovery options. Valid parameters are:

`source_cluster_identifier`
Identifier of the source database cluster from which to restore.
`restore_type`:
Type of restore to be performed. Valid options are "full-copy" and "copy-on-write".
`use_latest_restorable_time`:
Set to true to restore the database cluster to the latest restorable backup time. Conflicts with `restore_to_time`.
`restore_to_time`:
Date and time in UTC format to restore the database cluster to. Conflicts with `use_latest_restorable_time`. |
list(object({
source_cluster_identifier = string
restore_type = optional(string, "copy-on-write")
use_latest_restorable_time = optional(bool, true)
restore_to_time = optional(string, null)
}))
| `[]` | no | | [retention\_period](#input\_retention\_period) | Number of days to retain backups for | `number` | `5` | no | | [scaling\_configuration](#input\_scaling\_configuration) | List of nested attributes with scaling properties. Only valid when `engine_mode` is set to `serverless`. This is required for Serverless v1 |
list(object({
auto_pause = bool
max_capacity = number
min_capacity = number
seconds_until_auto_pause = number
timeout_action = string
}))
| `[]` | no | | [serverlessv2\_scaling\_configuration](#input\_serverlessv2\_scaling\_configuration) | Nested attribute with scaling properties for ServerlessV2. Only valid when `engine_mode` is set to `provisioned.` This is required for Serverless v2 |
object({
min_capacity = number
max_capacity = number
})
| `null` | no | @@ -396,4 +397,3 @@ components: [](https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse-terraform-components/aws-aurora-postgres&utm_content=) - From 550548f4d0253cd482c444ba88a2204f927b4a74 Mon Sep 17 00:00:00 2001 From: David Moran <23364162+wavemoran@users.noreply.github.com> Date: Thu, 18 Sep 2025 15:51:43 -0700 Subject: [PATCH 3/3] Revert "update docs" This reverts commit 0398385697b51a0e616d6d70a032ce2f68aa3e38. --- src/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/README.md b/src/README.md index b3d847f..f9ddef2 100644 --- a/src/README.md +++ b/src/README.md @@ -353,7 +353,6 @@ components: | [reader\_dns\_name\_part](#input\_reader\_dns\_name\_part) | Part of DNS name added to module and cluster name for DNS for cluster reader | `string` | `"reader"` | no | | [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.
Characters matching the regex will be removed from the ID elements.
If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no | | [region](#input\_region) | AWS Region | `string` | n/a | yes | -| [restore\_to\_point\_in\_time](#input\_restore\_to\_point\_in\_time) | List of point-in-time recovery options. Valid parameters are:

`source_cluster_identifier`
Identifier of the source database cluster from which to restore.
`restore_type`:
Type of restore to be performed. Valid options are "full-copy" and "copy-on-write".
`use_latest_restorable_time`:
Set to true to restore the database cluster to the latest restorable backup time. Conflicts with `restore_to_time`.
`restore_to_time`:
Date and time in UTC format to restore the database cluster to. Conflicts with `use_latest_restorable_time`. |
list(object({
source_cluster_identifier = string
restore_type = optional(string, "copy-on-write")
use_latest_restorable_time = optional(bool, true)
restore_to_time = optional(string, null)
}))
| `[]` | no | | [retention\_period](#input\_retention\_period) | Number of days to retain backups for | `number` | `5` | no | | [scaling\_configuration](#input\_scaling\_configuration) | List of nested attributes with scaling properties. Only valid when `engine_mode` is set to `serverless`. This is required for Serverless v1 |
list(object({
auto_pause = bool
max_capacity = number
min_capacity = number
seconds_until_auto_pause = number
timeout_action = string
}))
| `[]` | no | | [serverlessv2\_scaling\_configuration](#input\_serverlessv2\_scaling\_configuration) | Nested attribute with scaling properties for ServerlessV2. Only valid when `engine_mode` is set to `provisioned.` This is required for Serverless v2 |
object({
min_capacity = number
max_capacity = number
})
| `null` | no | @@ -397,3 +396,4 @@ components: [](https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse-terraform-components/aws-aurora-postgres&utm_content=) +