From ed5b83375baf27072baea06989bf7962c9d2de7e Mon Sep 17 00:00:00 2001 From: Vedant Pareek Date: Fri, 22 Mar 2024 12:33:13 +0530 Subject: [PATCH 1/2] Moved backup retention to a variable --- rds.tf | 2 +- variables.tf | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/rds.tf b/rds.tf index 4c19cb6..c426ec6 100644 --- a/rds.tf +++ b/rds.tf @@ -66,7 +66,7 @@ resource "aws_db_instance" "truefoundry_db" { db_name = local.truefoundry_db_database_name skip_final_snapshot = var.truefoundry_db_skip_final_snapshot password = random_password.truefoundry_db_password.result - backup_retention_period = 14 + backup_retention_period = var.truefoundry_db_backup_retention_period instance_class = var.truefoundry_db_instance_class performance_insights_enabled = var.truefoundry_db_enable_insights performance_insights_retention_period = var.truefoundry_db_enable_insights ? 31 : 0 diff --git a/variables.tf b/variables.tf index edabc18..c165c97 100644 --- a/variables.tf +++ b/variables.tf @@ -66,6 +66,12 @@ variable "truefoundry_db_publicly_accessible" { description = "Make database publicly accessible. Subnets and SG must match" } +variable "truefoundry_db_backup_retention_period" { + type = number + default = 14 + description = "Backup retention period for RDS" +} + variable "truefoundry_db_allocated_storage" { type = string description = "Storage for RDS. Minimum storage allowed for gp3 volumes is 20GB" From c317a49d51517a36eb27675f191875e65e0bc0c3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 22 Mar 2024 07:04:17 +0000 Subject: [PATCH 2/2] terraform-docs: automated action --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d5c4036..6bbeed2 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ Truefoundry AWS Control Plane Module | [tags](#input\_tags) | AWS Tags common to all the resources created | `map(string)` | `{}` | no | | [truefoundry\_artifact\_buckets\_will\_read](#input\_truefoundry\_artifact\_buckets\_will\_read) | A list of bucket IDs mlfoundry will need read access to, in order to show the stored artifacts. It accepts any valid IAM resource, including ARNs with wildcards, so you can do something like arn:aws:s3:::bucket-prefix-* | `list(string)` | `[]` | no | | [truefoundry\_db\_allocated\_storage](#input\_truefoundry\_db\_allocated\_storage) | Storage for RDS. Minimum storage allowed for gp3 volumes is 20GB | `string` | `"20"` | no | +| [truefoundry\_db\_backup\_retention\_period](#input\_truefoundry\_db\_backup\_retention\_period) | Backup retention period for RDS | `number` | `14` | no | | [truefoundry\_db\_deletion\_protection](#input\_truefoundry\_db\_deletion\_protection) | n/a | `bool` | `true` | no | | [truefoundry\_db\_enable\_insights](#input\_truefoundry\_db\_enable\_insights) | Enable insights to truefoundry db | `bool` | `false` | no | | [truefoundry\_db\_enable\_override](#input\_truefoundry\_db\_enable\_override) | Enable override for truefoundry db name. You must pass truefoundry\_db\_override\_name | `bool` | `false` | no |