From 91ad67b7eef0d26e04edceb1d8533313cdcc0a2e Mon Sep 17 00:00:00 2001 From: Matthias Fuhrmeister Date: Thu, 2 Nov 2023 15:12:58 +0100 Subject: [PATCH] Passthought variables for rds-cluster module (https://github.com/cloudposse/terraform-aws-components/pull/894) --- src/README.md | 2 ++ src/cluster-regional.tf | 2 ++ src/variables.tf | 12 ++++++++++++ 3 files changed, 16 insertions(+) diff --git a/src/README.md b/src/README.md index b6f461c..dcf3713 100644 --- a/src/README.md +++ b/src/README.md @@ -281,6 +281,7 @@ components: | [admin\_password](#input\_admin\_password) | Postgres password for the admin user | `string` | `""` | no | | [admin\_user](#input\_admin\_user) | Postgres admin user name | `string` | `""` | no | | [allow\_ingress\_from\_vpc\_accounts](#input\_allow\_ingress\_from\_vpc\_accounts) | List of account contexts to pull VPC ingress CIDR and add to cluster security group.
e.g.
{
environment = "ue2",
stage = "auto",
tenant = "core"
}

Defaults to the "vpc" component in the given account |
list(object({
vpc = optional(string, "vpc")
environment = optional(string)
stage = optional(string)
tenant = optional(string)
}))
| `[]` | no | +| [allow\_major\_version\_upgrade](#input\_allow\_major\_version\_upgrade) | Enable to allow major engine version upgrades when changing engine versions. Defaults to false. | `bool` | `false` | no | | [allowed\_cidr\_blocks](#input\_allowed\_cidr\_blocks) | List of CIDRs allowed to access the database (in addition to security groups and subnets) | `list(string)` | `[]` | no | | [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,
in the order they appear in the list. New attributes are appended to the
end of the list. The elements of the list are joined by the `delimiter`
and treated as a single ID element. | `list(string)` | `[]` | no | | [autoscaling\_enabled](#input\_autoscaling\_enabled) | Whether to enable cluster autoscaling | `bool` | `false` | no | @@ -291,6 +292,7 @@ components: | [autoscaling\_scale\_out\_cooldown](#input\_autoscaling\_scale\_out\_cooldown) | The amount of time, in seconds, after a scaling activity completes and before the next scaling up activity can start. Default is 300s | `number` | `300` | no | | [autoscaling\_target\_metrics](#input\_autoscaling\_target\_metrics) | The metrics type to use. If this value isn't provided the default is CPU utilization | `string` | `"RDSReaderAverageCPUUtilization"` | no | | [autoscaling\_target\_value](#input\_autoscaling\_target\_value) | The target value to scale with respect to target metrics | `number` | `75` | no | +| [ca\_cert\_identifier](#input\_ca\_cert\_identifier) | The identifier of the CA certificate for the DB instance | `string` | `null` | no | | [cluster\_dns\_name\_part](#input\_cluster\_dns\_name\_part) | Part of DNS name added to module and cluster name for DNS for cluster endpoint | `string` | `"writer"` | no | | [cluster\_family](#input\_cluster\_family) | Family of the DB parameter group. Valid values for Aurora PostgreSQL: `aurora-postgresql9.6`, `aurora-postgresql10`, `aurora-postgresql11`, `aurora-postgresql12` | `string` | `"aurora-postgresql13"` | no | | [cluster\_name](#input\_cluster\_name) | Short name for this cluster | `string` | n/a | yes | diff --git a/src/cluster-regional.tf b/src/cluster-regional.tf index d9de0f7..ccd911d 100644 --- a/src/cluster-regional.tf +++ b/src/cluster-regional.tf @@ -51,6 +51,8 @@ module "aurora_postgres_cluster" { skip_final_snapshot = var.skip_final_snapshot deletion_protection = var.deletion_protection snapshot_identifier = var.snapshot_identifier + allow_major_version_upgrade = var.allow_major_version_upgrade + ca_cert_identifier = var.ca_cert_identifier cluster_parameters = [ { diff --git a/src/variables.tf b/src/variables.tf index 0f2e465..3c3de97 100644 --- a/src/variables.tf +++ b/src/variables.tf @@ -55,6 +55,18 @@ variable "engine_version" { default = "13.4" } +variable "allow_major_version_upgrade" { + type = bool + default = false + description = "Enable to allow major engine version upgrades when changing engine versions. Defaults to false." +} + +variable "ca_cert_identifier" { + description = "The identifier of the CA certificate for the DB instance" + type = string + default = null +} + variable "engine_mode" { type = string description = "The database engine mode. Valid values: `global`, `multimaster`, `parallelquery`, `provisioned`, `serverless`"