{"id":20301609,"url":"https://github.com/104corp/terraform-aws-aurora","last_synced_at":"2026-05-05T16:11:21.721Z","repository":{"id":89169523,"uuid":"184532757","full_name":"104corp/terraform-aws-aurora","owner":"104corp","description":"Terraform module which creates Aurora resources on AWS","archived":false,"fork":false,"pushed_at":"2019-05-03T09:56:06.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-14T10:55:40.206Z","etag":null,"topics":["aurora","aws","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/104corp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-02T06:35:30.000Z","updated_at":"2023-02-10T08:15:14.000Z","dependencies_parsed_at":"2023-06-14T06:45:23.886Z","dependency_job_id":null,"html_url":"https://github.com/104corp/terraform-aws-aurora","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/104corp%2Fterraform-aws-aurora","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/104corp%2Fterraform-aws-aurora/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/104corp%2Fterraform-aws-aurora/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/104corp%2Fterraform-aws-aurora/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/104corp","download_url":"https://codeload.github.com/104corp/terraform-aws-aurora/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241801192,"owners_count":20022383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aurora","aws","terraform"],"created_at":"2024-11-14T16:26:44.330Z","updated_at":"2026-05-05T16:11:16.684Z","avatar_url":"https://github.com/104corp.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Aurora Terraform module\n\n![Build Status](https://travis-ci.com/104corp/terraform-aws-aurora.svg?branch=master) ![LicenseBadge](https://img.shields.io/github/license/104corp/terraform-aws-aurora.svg)\n\nAWS Aurora DB Cluster \u0026 Instance(s) Terraform Module.\n\nGives you:\n\n - A DB subnet group\n - An Aurora DB cluster\n - An Aurora DB instance + 'n' number of additional instances\n - Optionally RDS 'Enhanced Monitoring' + associated required IAM role/policy (by simply setting the `monitoring_interval` param to \u003e `0`\n - Optionally sensible alarms to SNS (high CPU, high connections, slow replication)\n - Optionally configure autoscaling for read replicas (MySQL clusters only)\n\n## Terraform version\n\nTerraform version 0.10.3 or newer is required for this module to work.\n\n## Contributing\n\nEnsure any variables you add have a type and a description.\nThis README is generated with [terraform-docs](https://github.com/segmentio/terraform-docs):\n\n`terraform-docs md . \u003e README.md`\n\n## Usage examples\n\n*It is recommended you always create a parameter group, even if it exactly matches the defaults.*\nChanging the parameter group in use requires a restart of the DB cluster, modifying parameters within a group\nmay not (depending on the parameter being altered)\n\n## Known issues\nAWS doesn't automatically remove RDS instances created from autoscaling when you remove the autoscaling rules and this can cause issues when using Terraform to destroy the cluster.  To work around this, you should make sure there are no automatically created RDS instances running before attempting to destroy a cluster.\n\n### Aurora 1.x (MySQL 5.6)\n\n```hcl\nresource \"aws_sns_topic\" \"db_alarms_56\" {\n  name = \"aurora-db-alarms-56\"\n}\n\nmodule \"aurora_db_56\" {\n  source                          = \"../..\"\n  name                            = \"test-aurora-db-56\"\n  envname                         = \"test56\"\n  envtype                         = \"test\"\n  subnets                         = [\"${module.vpc.private_subnets}\"]\n  azs                             = [\"${module.vpc.availability_zones}\"]\n  replica_count                   = \"1\"\n  security_groups                 = [\"${aws_security_group.allow_all.id}\"]\n  instance_type                   = \"db.t2.medium\"\n  username                        = \"root\"\n  password                        = \"changeme\"\n  backup_retention_period         = \"5\"\n  final_snapshot_identifier       = \"final-db-snapshot-prod\"\n  storage_encrypted               = \"true\"\n  apply_immediately               = \"true\"\n  monitoring_interval             = \"10\"\n  cw_alarms                       = true\n  cw_sns_topic                    = \"${aws_sns_topic.db_alarms_56.id}\"\n  db_parameter_group_name         = \"${aws_db_parameter_group.aurora_db_56_parameter_group.id}\"\n  db_cluster_parameter_group_name = \"${aws_rds_cluster_parameter_group.aurora_cluster_56_parameter_group.id}\"\n}\n\nresource \"aws_db_parameter_group\" \"aurora_db_56_parameter_group\" {\n  name        = \"test-aurora-db-56-parameter-group\"\n  family      = \"aurora5.6\"\n  description = \"test-aurora-db-56-parameter-group\"\n}\n\nresource \"aws_rds_cluster_parameter_group\" \"aurora_cluster_56_parameter_group\" {\n  name        = \"test-aurora-56-cluster-parameter-group\"\n  family      = \"aurora5.6\"\n  description = \"test-aurora-56-cluster-parameter-group\"\n}\n```\n\n### Aurora 2.x (MySQL 5.7)\n\n```hcl\nresource \"aws_sns_topic\" \"db_alarms\" {\n  name = \"aurora-db-alarms\"\n}\n\nmodule \"aurora_db_57\" {\n  source                          = \"../..\"\n  engine                          = \"aurora-mysql\"\n  engine_version                  = \"5.7.12\"\n  name                            = \"test-aurora-db-57\"\n  envname                         = \"test-57\"\n  envtype                         = \"test\"\n  subnets                         = [\"${module.vpc.private_subnets}\"]\n  azs                             = [\"${module.vpc.availability_zones}\"]\n  replica_count                   = \"1\"\n  security_groups                 = [\"${aws_security_group.allow_all.id}\"]\n  instance_type                   = \"db.t2.medium\"\n  username                        = \"root\"\n  password                        = \"changeme\"\n  backup_retention_period         = \"5\"\n  final_snapshot_identifier       = \"final-db-snapshot-prod\"\n  storage_encrypted               = \"true\"\n  apply_immediately               = \"true\"\n  monitoring_interval             = \"10\"\n  cw_alarms                       = true\n  cw_sns_topic                    = \"${aws_sns_topic.db_alarms.id}\"\n  db_parameter_group_name         = \"${aws_db_parameter_group.aurora_db_57_parameter_group.id}\"\n  db_cluster_parameter_group_name = \"${aws_rds_cluster_parameter_group.aurora_57_cluster_parameter_group.id}\"\n}\n\nresource \"aws_db_parameter_group\" \"aurora_db_57_parameter_group\" {\n  name        = \"test-aurora-db-57-parameter-group\"\n  family      = \"aurora-mysql5.7\"\n  description = \"test-aurora-db-57-parameter-group\"\n}\n\nresource \"aws_rds_cluster_parameter_group\" \"aurora_57_cluster_parameter_group\" {\n  name        = \"test-aurora-57-cluster-parameter-group\"\n  family      = \"aurora-mysql5.7\"\n  description = \"test-aurora-57-cluster-parameter-group\"\n}\n```\n### Aurora PostgreSQL\n\n```hcl\nresource \"aws_sns_topic\" \"db_alarms_postgres96\" {\n  name = \"aurora-db-alarms-postgres96\"\n}\n\nmodule \"aurora_db_postgres96\" {\n  source                          = \"../..\"\n  engine                          = \"aurora-postgresql\"\n  engine_version                  = \"9.6.3\"\n  name                            = \"test-aurora-db-postgres96\"\n  envname                         = \"test-pg96\"\n  envtype                         = \"test\"\n  subnets                         = [\"${module.vpc.private_subnets}\"]\n  azs                             = [\"${module.vpc.availability_zones}\"]\n  replica_count                   = \"1\"\n  security_groups                 = [\"${aws_security_group.allow_all.id}\"]\n  instance_type                   = \"db.r4.large\"\n  username                        = \"root\"\n  password                        = \"changeme\"\n  backup_retention_period         = \"5\"\n  final_snapshot_identifier       = \"final-db-snapshot-prod\"\n  storage_encrypted               = \"true\"\n  apply_immediately               = \"true\"\n  monitoring_interval             = \"10\"\n  cw_alarms                       = true\n  cw_sns_topic                    = \"${aws_sns_topic.db_alarms_postgres96.id}\"\n  db_parameter_group_name         = \"${aws_db_parameter_group.aurora_db_postgres96_parameter_group.id}\"\n  db_cluster_parameter_group_name = \"${aws_rds_cluster_parameter_group.aurora_cluster_postgres96_parameter_group.id}\"\n}\n\nresource \"aws_db_parameter_group\" \"aurora_db_postgres96_parameter_group\" {\n  name        = \"test-aurora-db-postgres96-parameter-group\"\n  family      = \"aurora-postgresql9.6\"\n  description = \"test-aurora-db-postgres96-parameter-group\"\n}\n\nresource \"aws_rds_cluster_parameter_group\" \"aurora_cluster_postgres96_parameter_group\" {\n  name        = \"test-aurora-postgres96-cluster-parameter-group\"\n  family      = \"aurora-postgresql9.6\"\n  description = \"test-aurora-postgres96-cluster-parameter-group\"\n}\n```\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|:----:|:-----:|:-----:|\n| apply\\_immediately | Determines whether or not any DB modifications are applied immediately, or during the maintenance window | string | `\"false\"` | no |\n| auto\\_minor\\_version\\_upgrade | Determines whether minor engine upgrades will be performed automatically in the maintenance window | string | `\"true\"` | no |\n| azs | List of AZs to use | list | n/a | yes |\n| backup\\_retention\\_period | How long to keep backups for (in days) | string | `\"7\"` | no |\n| cw\\_alarms | Whether to enable CloudWatch alarms - requires `cw_sns_topic` is specified | string | `\"false\"` | no |\n| cw\\_eval\\_period\\_connections | Evaluation period for the DB connections alarms | string | `\"1\"` | no |\n| cw\\_eval\\_period\\_cpu | Evaluation period for the DB CPU alarms | string | `\"2\"` | no |\n| cw\\_eval\\_period\\_replica\\_lag | Evaluation period for the DB replica lag alarm | string | `\"5\"` | no |\n| cw\\_max\\_conns | Connection count beyond which to trigger a CloudWatch alarm | string | `\"500\"` | no |\n| cw\\_max\\_cpu | CPU threshold above which to alarm | string | `\"85\"` | no |\n| cw\\_max\\_replica\\_lag | Maximum Aurora replica lag in milliseconds above which to alarm | string | `\"2000\"` | no |\n| cw\\_sns\\_topic | An SNS topic to publish CloudWatch alarms to | string | `\"false\"` | no |\n| database\\_name | Master DB name | string | `\"\"` | no |\n| db\\_cluster\\_parameter\\_group\\_name | The name of a DB Cluster parameter group to use | string | `\"default.aurora5.6\"` | no |\n| db\\_parameter\\_group\\_name | The name of a DB parameter group to use | string | `\"default.aurora5.6\"` | no |\n| enabled | Whether the database resources should be created | string | `\"true\"` | no |\n| engine | Aurora database engine type, currently aurora, aurora-mysql or aurora-postgresql | string | `\"aurora\"` | no |\n| engine\\_mode | Aurora database engine mode, currently global, parallelquery, provisioned or serverless | string | `\"provisioned\"` | no |\n| engine\\_version | Aurora database engine version. | string | `\"5.6.10a\"` | no |\n| envname | Environment name (eg,test, stage or prod) | string | n/a | yes |\n| envtype | Environment type (eg,prod or nonprod) | string | n/a | yes |\n| final\\_snapshot\\_identifier | The name to use when creating a final snapshot on cluster destroy, appends a random 8 digits to name to ensure it's unique too. | string | `\"final\"` | no |\n| iam\\_database\\_authentication\\_enabled | Whether to enable IAM database authentication for the RDS Cluster | string | `\"false\"` | no |\n| identifier\\_prefix | Prefix for cluster and instance identifier | string | `\"\"` | no |\n| instance\\_type | Instance type to use | string | `\"db.t2.small\"` | no |\n| monitoring\\_interval | The interval (seconds) between points when Enhanced Monitoring metrics are collected | string | `\"0\"` | no |\n| name | Name given to DB subnet group | string | n/a | yes |\n| password | Master DB password | string | n/a | yes |\n| performance\\_insights\\_enabled | Whether to enable Performance Insights | string | `\"false\"` | no |\n| port | The port on which to accept connections | string | `\"3306\"` | no |\n| preferred\\_backup\\_window | When to perform DB backups | string | `\"02:00-03:00\"` | no |\n| preferred\\_maintenance\\_window | When to perform DB maintenance | string | `\"sun:05:00-sun:06:00\"` | no |\n| publicly\\_accessible | Whether the DB should have a public IP address | string | `\"false\"` | no |\n| replica\\_count | Number of reader nodes to create.  If `replica_scale_enable` is `true`, the value of `replica_scale_min` is used instead. | string | `\"0\"` | no |\n| replica\\_scale\\_cpu | CPU usage to trigger autoscaling at | string | `\"70\"` | no |\n| replica\\_scale\\_enabled | Whether to enable autoscaling for RDS Aurora (MySQL) read replicas | string | `\"false\"` | no |\n| replica\\_scale\\_in\\_cooldown | Cooldown in seconds before allowing further scaling operations after a scale in | string | `\"300\"` | no |\n| replica\\_scale\\_max | Maximum number of replicas to allow scaling for | string | `\"0\"` | no |\n| replica\\_scale\\_min | Maximum number of replicas to allow scaling for | string | `\"2\"` | no |\n| replica\\_scale\\_out\\_cooldown | Cooldown in seconds before allowing further scaling operations after a scale out | string | `\"300\"` | no |\n| security\\_groups | VPC Security Group IDs | list | n/a | yes |\n| skip\\_final\\_snapshot | Should a final snapshot be created on cluster destroy | string | `\"false\"` | no |\n| snapshot\\_identifier | DB snapshot to create this database from | string | `\"\"` | no |\n| storage\\_encrypted | Specifies whether the underlying storage layer should be encrypted | string | `\"true\"` | no |\n| subnets | List of subnet IDs to use | list | n/a | yes |\n| username | Master DB username | string | `\"root\"` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| all\\_instance\\_endpoints\\_list | Comma separated list of all DB instance endpoints running in cluster |\n| cluster\\_endpoint | The 'writer' endpoint for the cluster |\n| cluster\\_identifier | The ID of the RDS Cluster |\n| reader\\_endpoint | A read-only endpoint for the Aurora cluster, automatically load-balanced across replicas |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F104corp%2Fterraform-aws-aurora","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F104corp%2Fterraform-aws-aurora","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F104corp%2Fterraform-aws-aurora/lists"}