{"id":19508821,"url":"https://github.com/rhythmictech/terraform-aws-rds-mysql","last_synced_at":"2025-04-26T03:31:46.454Z","repository":{"id":34992277,"uuid":"193568532","full_name":"rhythmictech/terraform-aws-rds-mysql","owner":"rhythmictech","description":"Create a mysql RDS instance","archived":false,"fork":false,"pushed_at":"2024-04-10T18:43:23.000Z","size":72,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T07:11:16.225Z","etag":null,"topics":["aws","mysql","rds","terraform","terraform-module","terraform-modules"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/rhythmictech/rds-mysql/aws","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhythmictech.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-06-24T19:44:15.000Z","updated_at":"2024-01-14T12:44:54.000Z","dependencies_parsed_at":"2023-11-14T00:29:11.007Z","dependency_job_id":"48c5bebf-8657-4374-b0a0-2198678c2e77","html_url":"https://github.com/rhythmictech/terraform-aws-rds-mysql","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-rds-mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-rds-mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-rds-mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-rds-mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhythmictech","download_url":"https://codeload.github.com/rhythmictech/terraform-aws-rds-mysql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250926813,"owners_count":21509041,"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":["aws","mysql","rds","terraform","terraform-module","terraform-modules"],"created_at":"2024-11-10T23:09:57.039Z","updated_at":"2025-04-26T03:31:46.185Z","avatar_url":"https://github.com/rhythmictech.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-aws-rds-mysql\n[![tflint](https://github.com/rhythmictech/terraform-aws-rds-mysql/workflows/tflint/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-rds-mysql/actions?query=workflow%3Atflint+event%3Apush+branch%3Amaster)\n[![tfsec](https://github.com/rhythmictech/terraform-aws-rds-mysql/workflows/tfsec/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-rds-mysql/actions?query=workflow%3Atfsec+event%3Apush+branch%3Amaster)\n[![yamllint](https://github.com/rhythmictech/terraform-aws-rds-mysql/workflows/yamllint/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-rds-mysql/actions?query=workflow%3Ayamllint+event%3Apush+branch%3Amaster)\n[![misspell](https://github.com/rhythmictech/terraform-aws-rds-mysql/workflows/misspell/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-rds-mysql/actions?query=workflow%3Amisspell+event%3Apush+branch%3Amaster)\n[![pre-commit-check](https://github.com/rhythmictech/terraform-aws-rds-mysql/workflows/pre-commit-check/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-rds-mysql/actions?query=workflow%3Apre-commit-check+event%3Apush+branch%3Amaster)\n\u003ca href=\"https://twitter.com/intent/follow?screen_name=RhythmicTech\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/RhythmicTech?style=social\u0026logo=twitter\" alt=\"follow on Twitter\"\u003e\u003c/a\u003e\n\nCreate and manage an RDS MySQL instance. Includes the ability to manage the master password in Secrets Manager and manage the security group that controls RDS access.\n\n## Usage\n```\nmodule \"rds-mysql\" {\n  source = \"rhythmictech/rds-mysql/aws\"\n\n  subnet_group_name = \"db_subnet_group\"\n  vpc_id            = \"vpc-1234567890\"\n}\n```\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 0.12.20 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e= 3.8 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | 4.56.0 |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_password\"\u003e\u003c/a\u003e [password](#module\\_password) | rhythmictech/secretsmanager-random-secret/aws | ~\u003e1.2.0 |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_db_instance.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance) | resource |\n| [aws_db_parameter_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_parameter_group) | resource |\n| [aws_security_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |\n| [aws_security_group_rule.allow_groups](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |\n| [aws_security_group_rule.allow_ipv4_cidrs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |\n| [aws_security_group_rule.allow_ipv6_cidrs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_allowed_cidr_blocks\"\u003e\u003c/a\u003e [allowed\\_cidr\\_blocks](#input\\_allowed\\_cidr\\_blocks) | CIDR blocks allowed to reach the database | `list(string)` | `[]` | no |\n| \u003ca name=\"input_allowed_ipv6_cidr_blocks\"\u003e\u003c/a\u003e [allowed\\_ipv6\\_cidr\\_blocks](#input\\_allowed\\_ipv6\\_cidr\\_blocks) | IPv6 CIDR blocks allowed to reach the database | `list(string)` | `[]` | no |\n| \u003ca name=\"input_allowed_security_groups\"\u003e\u003c/a\u003e [allowed\\_security\\_groups](#input\\_allowed\\_security\\_groups) | IDs of security groups allowed to reach the database (not Names) | `list(string)` | `[]` | no |\n| \u003ca name=\"input_backup_retention_period\"\u003e\u003c/a\u003e [backup\\_retention\\_period](#input\\_backup\\_retention\\_period) | How long to keep RDS backups (in days) | `number` | `5` | no |\n| \u003ca name=\"input_cloudwatch_log_exports\"\u003e\u003c/a\u003e [cloudwatch\\_log\\_exports](#input\\_cloudwatch\\_log\\_exports) | Log types to export to CloudWatch | `list(string)` | \u003cpre\u003e[\u003cbr\u003e  \"audit\",\u003cbr\u003e  \"error\",\u003cbr\u003e  \"general\",\u003cbr\u003e  \"slowquery\"\u003cbr\u003e]\u003c/pre\u003e | no |\n| \u003ca name=\"input_copy_tags_to_snapshot\"\u003e\u003c/a\u003e [copy\\_tags\\_to\\_snapshot](#input\\_copy\\_tags\\_to\\_snapshot) | If `true`, RDS instance tags will be copied to snapshots | `bool` | `true` | no |\n| \u003ca name=\"input_enable_deletion_protection\"\u003e\u003c/a\u003e [enable\\_deletion\\_protection](#input\\_enable\\_deletion\\_protection) | If `true`, deletion protection will be turned on for the RDS instance(s) | `bool` | `true` | no |\n| \u003ca name=\"input_engine\"\u003e\u003c/a\u003e [engine](#input\\_engine) | Database Engine to use for RDS (mysql or mariadb are acceptable here) | `string` | `\"mysql\"` | no |\n| \u003ca name=\"input_engine_version\"\u003e\u003c/a\u003e [engine\\_version](#input\\_engine\\_version) | Version of database engine to use | `string` | `\"5.7\"` | no |\n| \u003ca name=\"input_final_snapshot_identifier\"\u003e\u003c/a\u003e [final\\_snapshot\\_identifier](#input\\_final\\_snapshot\\_identifier) | name of final snapshot (will be computed automatically if not specified) | `string` | `null` | no |\n| \u003ca name=\"input_iam_database_authentication_enabled\"\u003e\u003c/a\u003e [iam\\_database\\_authentication\\_enabled](#input\\_iam\\_database\\_authentication\\_enabled) | Whether or not to enable IAM DB authentication | `bool` | `false` | no |\n| \u003ca name=\"input_identifier_prefix\"\u003e\u003c/a\u003e [identifier\\_prefix](#input\\_identifier\\_prefix) | DB identifier prefix (will be generated by AWS automatically if not specified) | `string` | `null` | no |\n| \u003ca name=\"input_instance_class\"\u003e\u003c/a\u003e [instance\\_class](#input\\_instance\\_class) | What instance type to use | `string` | `\"db.t3.small\"` | no |\n| \u003ca name=\"input_kms_key_id\"\u003e\u003c/a\u003e [kms\\_key\\_id](#input\\_kms\\_key\\_id) | If encrypting database with a KMS key, specify the id of the KMS key here. Note that storage\\_encrypted will also need to be set to true. | `string` | `null` | no |\n| \u003ca name=\"input_monitoring_interval\"\u003e\u003c/a\u003e [monitoring\\_interval](#input\\_monitoring\\_interval) | Monitoring interval in seconds (`0` to disable enhanced monitoring) | `number` | `0` | no |\n| \u003ca name=\"input_monitoring_role_arn\"\u003e\u003c/a\u003e [monitoring\\_role\\_arn](#input\\_monitoring\\_role\\_arn) | Enhanced Monitoring ARN (blank to omit) | `string` | `null` | no |\n| \u003ca name=\"input_multi_az\"\u003e\u003c/a\u003e [multi\\_az](#input\\_multi\\_az) | whether to make database multi-az | `bool` | `true` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | common name for resources in this module | `string` | `\"mysql-rds\"` | no |\n| \u003ca name=\"input_param_group_family_name\"\u003e\u003c/a\u003e [param\\_group\\_family\\_name](#input\\_param\\_group\\_family\\_name) | Family name of DB parameter group. Valid family names can be queried using aws cli: aws rds describe-db-engine-versions --query 'DBEngineVersions[].DBParameterGroupFamily' | `string` | `null` | no |\n| \u003ca name=\"input_parameter_group_name\"\u003e\u003c/a\u003e [parameter\\_group\\_name](#input\\_parameter\\_group\\_name) | Name of parameter group. conflicts with parameters | `string` | `null` | no |\n| \u003ca name=\"input_parameters\"\u003e\u003c/a\u003e [parameters](#input\\_parameters) | Database parameters (will create parameter group if not null) | \u003cpre\u003elist(object({\u003cbr\u003e    apply_method = string\u003cbr\u003e    name         = string\u003cbr\u003e    value        = string\u003cbr\u003e  }))\u003c/pre\u003e | \u003cpre\u003e[\u003cbr\u003e  {\u003cbr\u003e    \"apply_method\": \"immediate\",\u003cbr\u003e    \"name\": \"character_set_database\",\u003cbr\u003e    \"value\": \"utf8\"\u003cbr\u003e  },\u003cbr\u003e  {\u003cbr\u003e    \"apply_method\": \"immediate\",\u003cbr\u003e    \"name\": \"character_set_connection\",\u003cbr\u003e    \"value\": \"utf8\"\u003cbr\u003e  },\u003cbr\u003e  {\u003cbr\u003e    \"apply_method\": \"immediate\",\u003cbr\u003e    \"name\": \"character_set_filesystem\",\u003cbr\u003e    \"value\": \"utf8\"\u003cbr\u003e  },\u003cbr\u003e  {\u003cbr\u003e    \"apply_method\": \"immediate\",\u003cbr\u003e    \"name\": \"character_set_results\",\u003cbr\u003e    \"value\": \"utf8\"\u003cbr\u003e  },\u003cbr\u003e  {\u003cbr\u003e    \"apply_method\": \"immediate\",\u003cbr\u003e    \"name\": \"character_set_server\",\u003cbr\u003e    \"value\": \"utf8\"\u003cbr\u003e  },\u003cbr\u003e  {\u003cbr\u003e    \"apply_method\": \"immediate\",\u003cbr\u003e    \"name\": \"character_set_client\",\u003cbr\u003e    \"value\": \"utf8\"\u003cbr\u003e  },\u003cbr\u003e  {\u003cbr\u003e    \"apply_method\": \"immediate\",\u003cbr\u003e    \"name\": \"collation_connection\",\u003cbr\u003e    \"value\": \"utf8_bin\"\u003cbr\u003e  },\u003cbr\u003e  {\u003cbr\u003e    \"apply_method\": \"immediate\",\u003cbr\u003e    \"name\": \"collation_server\",\u003cbr\u003e    \"value\": \"utf8_bin\"\u003cbr\u003e  },\u003cbr\u003e  {\u003cbr\u003e    \"apply_method\": \"immediate\",\u003cbr\u003e    \"name\": \"max_allowed_packet\",\u003cbr\u003e    \"value\": \"1073741824\"\u003cbr\u003e  }\u003cbr\u003e]\u003c/pre\u003e | no |\n| \u003ca name=\"input_pass_version\"\u003e\u003c/a\u003e [pass\\_version](#input\\_pass\\_version) | Increment to force master user password change (not used if `password` is set) | `number` | `1` | no |\n| \u003ca name=\"input_password\"\u003e\u003c/a\u003e [password](#input\\_password) | Master password (if not set, one will be generated dynamically and exposed through a secret) | `string` | `null` | no |\n| \u003ca name=\"input_password_length\"\u003e\u003c/a\u003e [password\\_length](#input\\_password\\_length) | Master password length (not used if `password` is set) | `number` | `30` | no |\n| \u003ca name=\"input_password_override_special_characters\"\u003e\u003c/a\u003e [password\\_override\\_special\\_characters](#input\\_password\\_override\\_special\\_characters) | Set of special characters to allow when creating the password. The default is suitable for generating MySQL passwords for RDS. NOTE: If you created your database on a module version before 3.3.0, you need to explicitly set this value to an empty string '' in order to keep your password from being regenerated. | `string` | `\"#$%^*()-=_+[]{};\u003c\u003e?,.\"` | no |\n| \u003ca name=\"input_performance_insights_enabled\"\u003e\u003c/a\u003e [performance\\_insights\\_enabled](#input\\_performance\\_insights\\_enabled) | If true, performance insights will be enabled | `bool` | `false` | no |\n| \u003ca name=\"input_port\"\u003e\u003c/a\u003e [port](#input\\_port) | Port the database should listen on | `string` | `\"3306\"` | no |\n| \u003ca name=\"input_skip_final_snapshot\"\u003e\u003c/a\u003e [skip\\_final\\_snapshot](#input\\_skip\\_final\\_snapshot) | If `true` no final snapshot will be taken on termination | `bool` | `false` | no |\n| \u003ca name=\"input_snapshot_identifier\"\u003e\u003c/a\u003e [snapshot\\_identifier](#input\\_snapshot\\_identifier) | Specifies whether or not to create this database from a snapshot. This correlates to the snapshot ID you'd find in the RDS console, e.g: rds:production-2015-06-26-06-05. | `string` | `\"\"` | no |\n| \u003ca name=\"input_storage\"\u003e\u003c/a\u003e [storage](#input\\_storage) | How much storage is available to the database | `string` | `20` | no |\n| \u003ca name=\"input_storage_encrypted\"\u003e\u003c/a\u003e [storage\\_encrypted](#input\\_storage\\_encrypted) | Encrypt DB storage | `bool` | `true` | no |\n| \u003ca name=\"input_storage_type\"\u003e\u003c/a\u003e [storage\\_type](#input\\_storage\\_type) | What storage backend to use (`gp2` or `standard`. io1 not supported) | `string` | `\"gp2\"` | no |\n| \u003ca name=\"input_subnet_group_name\"\u003e\u003c/a\u003e [subnet\\_group\\_name](#input\\_subnet\\_group\\_name) | name of DB subnet group to place DB in | `string` | n/a | yes |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Tags to apply to supported resources | `map(string)` | `{}` | no |\n| \u003ca name=\"input_username\"\u003e\u003c/a\u003e [username](#input\\_username) | username of master user | `string` | `\"mysql_user\"` | no |\n| \u003ca name=\"input_vpc_id\"\u003e\u003c/a\u003e [vpc\\_id](#input\\_vpc\\_id) | ID of VPC resources will be created in | `string` | n/a | yes |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_address\"\u003e\u003c/a\u003e [address](#output\\_address) | RDS database address |\n| \u003ca name=\"output_instance_connection_info\"\u003e\u003c/a\u003e [instance\\_connection\\_info](#output\\_instance\\_connection\\_info) | Object containing connection info |\n| \u003ca name=\"output_instance_id\"\u003e\u003c/a\u003e [instance\\_id](#output\\_instance\\_id) | Instance ID of RDS DB |\n| \u003ca name=\"output_password_secret_arn\"\u003e\u003c/a\u003e [password\\_secret\\_arn](#output\\_password\\_secret\\_arn) | Password secret ARN |\n| \u003ca name=\"output_password_secret_version_id\"\u003e\u003c/a\u003e [password\\_secret\\_version\\_id](#output\\_password\\_secret\\_version\\_id) | Password secret version |\n| \u003ca name=\"output_username\"\u003e\u003c/a\u003e [username](#output\\_username) | Master username |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhythmictech%2Fterraform-aws-rds-mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhythmictech%2Fterraform-aws-rds-mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhythmictech%2Fterraform-aws-rds-mysql/lists"}