{"id":20301592,"url":"https://github.com/104corp/terraform-aws-aurora-serverless","last_synced_at":"2025-04-11T13:36:36.724Z","repository":{"id":36581698,"uuid":"184546529","full_name":"104corp/terraform-aws-aurora-serverless","owner":"104corp","description":"Terraform module which creates Aurora Serverless resources on AWS","archived":false,"fork":false,"pushed_at":"2022-04-02T11:22:53.000Z","size":46,"stargazers_count":13,"open_issues_count":4,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T09:49:26.737Z","etag":null,"topics":["aurora","aws","serverless","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}},"created_at":"2019-05-02T08:28:49.000Z","updated_at":"2024-04-29T21:23:13.000Z","dependencies_parsed_at":"2022-08-08T16:00:41.438Z","dependency_job_id":null,"html_url":"https://github.com/104corp/terraform-aws-aurora-serverless","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/104corp%2Fterraform-aws-aurora-serverless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/104corp%2Fterraform-aws-aurora-serverless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/104corp%2Fterraform-aws-aurora-serverless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/104corp%2Fterraform-aws-aurora-serverless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/104corp","download_url":"https://codeload.github.com/104corp/terraform-aws-aurora-serverless/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248410205,"owners_count":21098772,"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","serverless","terraform"],"created_at":"2024-11-14T16:26:40.838Z","updated_at":"2025-04-11T13:36:36.693Z","avatar_url":"https://github.com/104corp.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Aurora Serverless Terraform module\n\n![Build Status](https://travis-ci.com/104corp/terraform-aws-aurora-serverless.svg?branch=master) ![LicenseBadge](https://img.shields.io/github/license/104corp/terraform-aws-aurora-serverless.svg)\n\nAWS Aurora DB Cluster for Serverless Terraform Module.\n\nGives you:\n\n - A DB subnet group\n - An Aurora DB cluster\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\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### 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  security_groups                 = [\"${aws_security_group.allow_all.id}\"]\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_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  security_groups                 = [\"${aws_security_group.allow_all.id}\"]\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\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  security_groups                 = [\"${aws_security_group.allow_all.id}\"]\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## Development\n\nTerraform modules on the Terraform Module Registry are open projects, and community contributions are essential for keeping them great. Please follow our guidelines when contributing changes.\n\nFor more information, see our [module contribution guide](https://registry.terraform.io/modules/104corp/aurora-serverless/aws/).\n\n## Contributors\n\nTo see who's already involved, see the list of [contributors](https://github.com/104corp/terraform-aws-aurora-serverless/graphs/contributors).\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| auto\\_pause | When to perform DB auto pause | 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\\_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 identifier | string | `\"\"` | no |\n| max\\_capacity | The max capacity for database | string | `\"8\"` | no |\n| min\\_capacity | The min capacity for database | string | `\"2\"` | 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| 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| tags | Tags for the created resources | map | `{envname=\"${var.envname}\", envtype=\"${var.envtype}\"}` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\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-serverless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F104corp%2Fterraform-aws-aurora-serverless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F104corp%2Fterraform-aws-aurora-serverless/lists"}