From b3f1b40317562e177374697d82b601f86323290d Mon Sep 17 00:00:00 2001 From: Manikanta Date: Fri, 28 Jun 2024 18:14:56 +0530 Subject: [PATCH] added additiona var for aurora --- README.md | 27 +++++++++++++++++++++++++++ main.tf | 3 +++ variables.tf | 12 ++++++++++++ 3 files changed, 42 insertions(+) diff --git a/README.md b/README.md index 32c4243..1634f4e 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,31 @@ To see a full example, check out the [main.tf](https://github.com/sourcefuse/ter ## Resources +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.3, < 2.0.0 | +| [aws](#requirement\_aws) | >= 4.0 | +| [null](#requirement\_null) | >= 3.1.1 | +| [random](#requirement\_random) | >= 3.4.0 | + +## Providers + +| Name | Version | +|------|---------| +| [aws](#provider\_aws) | 4.57.0 | +| [random](#provider\_random) | 3.4.3 | + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| [aurora\_cluster](#module\_aurora\_cluster) | git::https://github.com/cloudposse/terraform-aws-rds-cluster.git | 1.9.0 | +| [db\_management](#module\_db\_management) | git::https://github.com/cloudposse/terraform-aws-s3-bucket | 4.2.0 | +| [rds\_instance](#module\_rds\_instance) | git::https://github.com/cloudposse/terraform-aws-rds | 1.1.1 | +| [this](#module\_this) | cloudposse/label/null | 0.25.0 | + +## Resources + | Name | Type | |------|------| | [aws_db_instance_role_association.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance_role_association) | resource | @@ -77,6 +102,8 @@ To see a full example, check out the [main.tf](https://github.com/sourcefuse/ter | [aurora\_allow\_major\_version\_upgrade](#input\_aurora\_allow\_major\_version\_upgrade) | Enable to allow major engine version upgrades when changing engine versions. Defaults to false. | `bool` | `false` | no | | [aurora\_allowed\_cidr\_blocks](#input\_aurora\_allowed\_cidr\_blocks) | List of CIDR blocks allowed to access the cluster | `list(string)` | `[]` | no | | [aurora\_auto\_minor\_version\_upgrade](#input\_aurora\_auto\_minor\_version\_upgrade) | Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window | `bool` | `true` | no | +| [aurora\_backup\_retention\_period](#input\_aurora\_backup\_retention\_period) | Number of days to retain backups for | `number` | `5` | no | +| [aurora\_backup\_window](#input\_aurora\_backup\_window) | Daily time range during which the backups happen | `string` | `"07:00-09:00"` | no | | [aurora\_ca\_cert\_identifier](#input\_aurora\_ca\_cert\_identifier) | The identifier of the CA certificate for the Aurora DB instance | `string` | `null` | no | | [aurora\_cluster\_enabled](#input\_aurora\_cluster\_enabled) | Enable creation of an Aurora Cluster | `bool` | `false` | no | | [aurora\_cluster\_family](#input\_aurora\_cluster\_family) | The family of the DB cluster parameter group | `string` | `"aurora-postgresql14"` | no | diff --git a/main.tf b/main.tf index 8182a92..f1582e2 100644 --- a/main.tf +++ b/main.tf @@ -171,6 +171,9 @@ module "aurora_cluster" { performance_insights_retention_period = var.performance_insights_retention_period enabled_cloudwatch_logs_exports = var.aurora_enabled_cloudwatch_logs_exports + backup_window = var.aurora_backup_window + retention_period = var.aurora_backup_retention_period + vpc_security_group_ids = var.vpc_security_group_ids kms_key_arn = var.kms_key_arn ca_cert_identifier = var.aurora_ca_cert_identifier diff --git a/variables.tf b/variables.tf index f6718e9..dd95404 100644 --- a/variables.tf +++ b/variables.tf @@ -135,6 +135,18 @@ variable "aurora_cluster_size" { description = "Number of DB instances to create in the cluster" } +variable "aurora_backup_retention_period" { + type = number + default = 5 + description = "Number of days to retain backups for" +} + +variable "aurora_backup_window" { + type = string + default = "07:00-09:00" + description = "Daily time range during which the backups happen" +} + variable "aurora_instance_type" { type = string default = "db.serverless"