Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/cluster-regional.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# https://www.terraform.io/docs/providers/aws/r/rds_cluster.html
module "aurora_postgres_cluster" {
source = "cloudposse/rds-cluster/aws"
version = "1.18.0"
version = "2.1.1"

cluster_type = "regional"
engine = var.engine
Expand All @@ -14,6 +14,7 @@ module "aurora_postgres_cluster" {
cluster_family = var.cluster_family
instance_type = var.instance_type
cluster_size = var.cluster_size
promotion_tier = var.promotion_tier
admin_user = local.admin_user
admin_password = local.admin_password

Expand Down
15 changes: 15 additions & 0 deletions src/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@ output "replicas_hostname" {
description = "Postgres replicas hostname"
}

output "cluster_endpoint" {
value = module.aurora_postgres_cluster.endpoint
description = "Postgres cluster endpoint"
}

output "reader_endpoint" {
value = module.aurora_postgres_cluster.reader_endpoint
description = "Postgres reader endpoint"
}

output "instance_endpoints" {
value = module.aurora_postgres_cluster.instance_endpoints
description = "List of Postgres instance endpoints"
}

output "cluster_identifier" {
value = module.aurora_postgres_cluster.cluster_identifier
description = "Postgres cluster identifier"
Expand Down
10 changes: 10 additions & 0 deletions src/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,16 @@ variable "rds_monitoring_interval" {
default = 60
}

variable "promotion_tier" {
type = number
default = 0
description = <<-EOT
Failover Priority setting on instance level. The reader who has lower tier has higher priority to get promoted to writer.

Readers in promotion tiers 0 and 1 scale at the same time as the writer. Readers in promotion tiers 2–15 scale independently from the writer. For more information, see: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.how-it-works.html#aurora-serverless-v2.how-it-works.scaling
EOT
}

variable "autoscaling_enabled" {
type = bool
default = false
Expand Down
Loading