Skip to content

geekcell/terraform-aws-rds-aurora-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geek Cell GmbH

Code Quality

License GitHub release (latest tag) Release Validate Lint

Security

Infrastructure Tests

Cloud

Infrastructure Tests Infrastructure Tests Infrastructure Tests Infrastructure Tests Infrastructure Tests

Container

Infrastructure Tests Infrastructure Tests Infrastructure Tests Infrastructure Tests

Data protection

Infrastructure Tests Infrastructure Tests Infrastructure Tests Infrastructure Tests Infrastructure Tests Infrastructure Tests Infrastructure Tests

Terraform AWS RDS Aurora Cluster

This Terraform module provides a preconfigured solution for setting up AWS RDS Aurora clusters in your AWS account. With this module, you can easily and efficiently create and manage RDS Aurora clusters with advanced features. Our team has extensive experience working with AWS RDS Aurora and has optimized this module to provide the best possible experience for users.

By using this Terraform module, you can save time and effort in setting up and managing your RDS Aurora clusters, as well as ensure that your data is secure and protected. The module creates two users on the RDS Proxy, one with DML rights and one with DDL rights, to provide an additional layer of security and management. The autoscaling feature is also preconfigured, allowing for efficient and automatic management of resources based on your workload. The module encapsulates all necessary configurations, making it easy to use and integrate into your existing AWS environment. Whether you are just getting started with AWS RDS Aurora or looking for a more efficient way to manage your clusters, this Terraform module provides a preconfigured solution with advanced features such as extended backups, user management, and autoscaling.

Inputs

Name Description Type Default Required
additional_reader_capacity The minimum of additional reader capacity in an AWS RDS Cluster. number 0 no
allow_major_version_upgrade Indicates that major version upgrades are allowed. bool false no
apply_immediately Specifies whether any database modifications are applied immediately, or during the next maintenance window. bool true no
auto_minor_version_upgrade Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window. bool false no
backup_retention_period The days to retain backups for. Must be between 0 and 35. number 35 no
cluster_identifier The cluster identifier. If omitted, Terraform will assign a random, unique identifier. string n/a yes
database_event_recipients Recipients of the database events. list(string) [] no
database_name Name for an automatically created database on cluster creation. string null no
database_subnet_group_name Name of DB subnet group. string n/a yes
db_cluster_family The family of the DB cluster group. string "aurora-mysql8.0" no
db_cluster_parameter_group_name The name of the DB cluster parameter group. string null no
db_cluster_parameters The name and values of the DB parameters.
list(object({
apply_method = optional(string)
name = string
value = string
}))
[] no
db_instance_family The family of the DB parameter group. string "aurora-mysql8.0" no
db_instance_parameter_group_name The name of the DB parameter group. string null no
db_instance_parameters The name and values of the DB parameters.
list(object({
apply_method = optional(string)
name = string
value = string
}))
[] no
db_proxy_users List of DB Proxy users. list(string)
[
"application_dml",
"application_ddl"
]
no
deletion_protection If the DB instance should have deletion protection enabled. bool true no
enable_db_proxy Enable DB Proxy. bool true no
enabled_cloudwatch_logs_exports Set of log types to enable for exporting to CloudWatch logs. list(string)
[
"audit",
"error",
"general",
"slowquery"
]
no
engine The engine to use. string "aurora-mysql" no
engine_mode The engine mode to use. string "provisioned" no
engine_version The engine version to use. string null no
instance_class The instance type of the RDS instance. string n/a yes
monitoring_interval The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. number 60 no
performance_insights_enabled Specifies whether Performance Insights is enabled or not. bool true no
performance_insights_retention_period Amount of time in days to retain Performance Insights data. number 7 no
port The port on which the DB accepts connections. number 3306 no
preferred_backup_window The daily time range (in UTC) during which automated backups are created if they are enabled. string "00:00-02:30" no
preferred_maintenance_window The weekly time range during which system maintenance can occur, in (UTC). string "Mon:03:00-Mon:04:30" no
tags Tags to add to the AWS RDS Cluster Instance. map(any) {} no
vpc_security_group_ids_rds_cluster List of VPC security groups to associate with the RDS Proxy. list(string) null no
vpc_security_group_ids_rds_proxy List of VPC security groups to associate with the RDS Proxy. list(string) null no
vpc_subnet_ids List of VPC subnet IDs. list(string) n/a yes

Outputs

Name Description
cluster_endpoint The cluster endpoint
instance_endpoint The instance endpoint

Providers

No providers.

Resources

Examples

Basic Example

module "basic-example" {
  source = "../../"

  cluster_identifier                 = "my-db"
  database_subnet_group_name         = "db-subnet-group"
  instance_class                     = "db.t3.medium"
  vpc_security_group_ids_rds_cluster = ["sg-1234567890"]
  vpc_subnet_ids                     = ["subnet-12345678", "subnet-87654321"]
}

with RDS Proxy

module "with-rds-proxy" {
  source = "../../"

  cluster_identifier                 = "my-cluster"
  database_subnet_group_name         = "db-subnet-group-name"
  instance_class                     = "db.t4g.medium"
  vpc_security_group_ids_rds_cluster = ["sg-1234567890"]
  vpc_subnet_ids = [
    "subnet-123", "subnet-456", "subnet-789"
  ]

  enable_db_proxy = true
}