{"id":20925599,"url":"https://github.com/padok-team/terraform-aws-rds","last_synced_at":"2025-05-13T17:33:11.779Z","repository":{"id":39969063,"uuid":"422142990","full_name":"padok-team/terraform-aws-rds","owner":"padok-team","description":"Module to deploy a RDS Instance","archived":false,"fork":false,"pushed_at":"2023-01-06T16:50:21.000Z","size":70,"stargazers_count":6,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-03-06T00:58:30.087Z","etag":null,"topics":["aws","rds","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/padok-team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2021-10-28T09:28:09.000Z","updated_at":"2023-02-23T08:34:29.000Z","dependencies_parsed_at":"2023-02-06T06:47:33.001Z","dependency_job_id":null,"html_url":"https://github.com/padok-team/terraform-aws-rds","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padok-team%2Fterraform-aws-rds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padok-team%2Fterraform-aws-rds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padok-team%2Fterraform-aws-rds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padok-team%2Fterraform-aws-rds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/padok-team","download_url":"https://codeload.github.com/padok-team/terraform-aws-rds/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225248135,"owners_count":17444185,"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","rds","terraform"],"created_at":"2024-11-18T20:33:41.486Z","updated_at":"2024-11-18T20:33:43.126Z","avatar_url":"https://github.com/padok-team.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS RDS Terraform module\n\nTerraform module which creates **RDS** resources on **AWS**.\n\n## User Stories for this module\n\n- AAOps I can create a Postgres, MariaDB or MySQL database with its name, subnet, version, disk (type and size), maximum number of connections and activate (or not) high availability\n- AAOps I can force SSL connections to the database\n- AAOps I can store my DB credentials in SecretManager\n- AAOps AAOps I can encrypt my database with an existing KMS Key (Custom or AWS-managed) or have it generated by the module\n\n## Usage\n\n```hcl\nmodule \"rds\" {\n  source = \"https://github.com/padok-team/terraform-aws-rds.git?ref=v1.0.1\"\n\n  aws_region = \"eu-west-3\"\n\n  identifier = \"rds-poc-library-multi-az\"\n\n  ## DATABASE\n  engine              = \"postgres\"\n  engine_version      = \"13.4\"\n  db_parameter_family = \"postgres13\"\n  name                = \"aws_rds_instance_poc_library_multi_az\"\n  username            = \"aws_rds_instance_user_poc_library_multi_az\"\n\n  ## NETWORK\n  subnet_ids = [\"subnet-0f55d716e3746c4db\", \"subnet-0ced4e0a55a479422\", \"subnet-0005a41a2318130e5\"]\n  vpc_id     = \"vpc-0fcea78a178762e3f\"\n}\n```\n\n## Examples\n\n- [Postgres RDS instance with multi AZ](examples/multi_az_rds_instance_postgres/main.tf)\n- [MySQL RDS instance single AZ](examples/one_az_rds_instance_mysql/main.tf)\n- [MariaDB RDS instance single AZ](examples/multi_az_rds_instance_mariadb/main.tf)\n- [Cross-region backups](examples/cross_region_backups_rds_instance_postgress/main.tf)\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Modules\n\nNo modules.\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_db_parameter_family\"\u003e\u003c/a\u003e [db\\_parameter\\_family](#input\\_db\\_parameter\\_family) | The family of the DB parameter group. Should be one of: postgres11, postgres12, postgres13, mysql5.6, mysql5.7, mysql8.0 for MySQL or Postgres | `string` | n/a | yes |\n| \u003ca name=\"input_engine\"\u003e\u003c/a\u003e [engine](#input\\_engine) | Engine used for your RDS instance (mysql, postgres ...) | `string` | n/a | yes |\n| \u003ca name=\"input_engine_version\"\u003e\u003c/a\u003e [engine\\_version](#input\\_engine\\_version) | Version of your engine | `string` | n/a | yes |\n| \u003ca name=\"input_identifier\"\u003e\u003c/a\u003e [identifier](#input\\_identifier) | Unique identifier for your RDS instance. For example, aws\\_rds\\_instance\\_postgres\\_poc\\_library\\_break | `string` | n/a | yes |\n| \u003ca name=\"input_subnet_ids\"\u003e\u003c/a\u003e [subnet\\_ids](#input\\_subnet\\_ids) | A list of VPC subnet IDs to create your db subnet group | `list(string)` | n/a | yes |\n| \u003ca name=\"input_vpc_id\"\u003e\u003c/a\u003e [vpc\\_id](#input\\_vpc\\_id) | ID of the VPC to deploy the database to | `string` | n/a | yes |\n| \u003ca name=\"input_allocated_storage\"\u003e\u003c/a\u003e [allocated\\_storage](#input\\_allocated\\_storage) | Storage allocated to your RDS instance in Gigabytes | `number` | `10` | no |\n| \u003ca name=\"input_allow_major_version_upgrade\"\u003e\u003c/a\u003e [allow\\_major\\_version\\_upgrade](#input\\_allow\\_major\\_version\\_upgrade) | Indicates that major version upgrades are allowed | `bool` | `false` | no |\n| \u003ca name=\"input_apply_immediately\"\u003e\u003c/a\u003e [apply\\_immediately](#input\\_apply\\_immediately) | Specifies if database modifications should be applied immediately, or during the next maintenance window | `bool` | `false` | no |\n| \u003ca name=\"input_arn_custom_backups_kms_key\"\u003e\u003c/a\u003e [arn\\_custom\\_backups\\_kms\\_key](#input\\_arn\\_custom\\_backups\\_kms\\_key) | Arn of your custom KMS Key for backups. | `string` | `null` | no |\n| \u003ca name=\"input_arn_custom_kms_key\"\u003e\u003c/a\u003e [arn\\_custom\\_kms\\_key](#input\\_arn\\_custom\\_kms\\_key) | Arn of your custom KMS Key. Useful only if custom\\_kms\\_key is set to true | `string` | `null` | no |\n| \u003ca name=\"input_arn_custom_kms_key_secret\"\u003e\u003c/a\u003e [arn\\_custom\\_kms\\_key\\_secret](#input\\_arn\\_custom\\_kms\\_key\\_secret) | Encrypt AWS secret with CMK | `string` | `null` | no |\n| \u003ca name=\"input_auto_minor_version_upgrade\"\u003e\u003c/a\u003e [auto\\_minor\\_version\\_upgrade](#input\\_auto\\_minor\\_version\\_upgrade) | Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window | `bool` | `true` | no |\n| \u003ca name=\"input_availability_zone\"\u003e\u003c/a\u003e [availability\\_zone](#input\\_availability\\_zone) | Availability zone to use when Multi AZ is disabled | `string` | `\"eu-west-3a\"` | no |\n| \u003ca name=\"input_backup_retention_period\"\u003e\u003c/a\u003e [backup\\_retention\\_period](#input\\_backup\\_retention\\_period) | Backup retention period | `number` | `30` | no |\n| \u003ca name=\"input_cross_region_backup_replication\"\u003e\u003c/a\u003e [cross\\_region\\_backup\\_replication](#input\\_cross\\_region\\_backup\\_replication) | Wheter or not enable cross region backups replication | `bool` | `true` | no |\n| \u003ca name=\"input_deletion_protection\"\u003e\u003c/a\u003e [deletion\\_protection](#input\\_deletion\\_protection) | If the DB instance should have deletion protection enabled. The database can't be deleted when this value is set to true | `bool` | `true` | no |\n| \u003ca name=\"input_force_ssl\"\u003e\u003c/a\u003e [force\\_ssl](#input\\_force\\_ssl) | Force SSL for DB connections, only works with Postgres engine | `string` | `true` | no |\n| \u003ca name=\"input_iam_database_authentication_enabled\"\u003e\u003c/a\u003e [iam\\_database\\_authentication\\_enabled](#input\\_iam\\_database\\_authentication\\_enabled) | Specifies whether or not mappings of AWS Identity and Access Management (IAM) accounts to database accounts are enabled | `bool` | `false` | no |\n| \u003ca name=\"input_instance_class\"\u003e\u003c/a\u003e [instance\\_class](#input\\_instance\\_class) | Instance class for your RDS instance | `string` | `\"db.t3.micro\"` | no |\n| \u003ca name=\"input_maintenance_window\"\u003e\u003c/a\u003e [maintenance\\_window](#input\\_maintenance\\_window) | The window to perform maintenance in. Syntax: 'ddd:hh24:mi-ddd:hh24:mi'. Eg: 'Mon:00:00-Mon:03:00' | `string` | `\"Mon:00:00-Mon:03:00\"` | no |\n| \u003ca name=\"input_max_allocated_storage\"\u003e\u003c/a\u003e [max\\_allocated\\_storage](#input\\_max\\_allocated\\_storage) | When configured, the upper limit to which Amazon RDS can automatically scale the storage of the DB instance | `number` | `50` | no |\n| \u003ca name=\"input_multi_az\"\u003e\u003c/a\u003e [multi\\_az](#input\\_multi\\_az) | Set to true to deploy a multi AZ RDS instance | `bool` | `false` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Name of your database in your RDS instance | `string` | `\"aws_padok_database_instance\"` | no |\n| \u003ca name=\"input_parameters\"\u003e\u003c/a\u003e [parameters](#input\\_parameters) | List of paramaters to add to the database | \u003cpre\u003elist(object({\u003cbr\u003e    name         = string\u003cbr\u003e    value        = string\u003cbr\u003e    apply_method = string\u003cbr\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_password_length\"\u003e\u003c/a\u003e [password\\_length](#input\\_password\\_length) | Password length for db master user, Minimum length is 25 | `number` | `40` | no |\n| \u003ca name=\"input_performance_insights_enabled\"\u003e\u003c/a\u003e [performance\\_insights\\_enabled](#input\\_performance\\_insights\\_enabled) | Set to true to enable performance insights on your RDS instance | `bool` | `true` | no |\n| \u003ca name=\"input_port\"\u003e\u003c/a\u003e [port](#input\\_port) | The port on which the DB accepts connections. Default is chosen depeding on the engine | `number` | `null` | no |\n| \u003ca name=\"input_publicly_accessible\"\u003e\u003c/a\u003e [publicly\\_accessible](#input\\_publicly\\_accessible) | Boolean to control if instance is publicly accessible. | `bool` | `false` | no |\n| \u003ca name=\"input_rds_secret_recovery_window_in_days\"\u003e\u003c/a\u003e [rds\\_secret\\_recovery\\_window\\_in\\_days](#input\\_rds\\_secret\\_recovery\\_window\\_in\\_days) | Secret recovery window in days | `number` | `10` | no |\n| \u003ca name=\"input_rds_skip_final_snapshot\"\u003e\u003c/a\u003e [rds\\_skip\\_final\\_snapshot](#input\\_rds\\_skip\\_final\\_snapshot) | If set to true, a final DB snapshot will be created before the DB instance is deleted | `bool` | `false` | no |\n| \u003ca name=\"input_security_group_ids\"\u003e\u003c/a\u003e [security\\_group\\_ids](#input\\_security\\_group\\_ids) | Security group IDs allowed to connect to the RDS Instance | `list(string)` | `[]` | no |\n| \u003ca name=\"input_storage_type\"\u003e\u003c/a\u003e [storage\\_type](#input\\_storage\\_type) | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD) | `string` | `\"gp2\"` | no |\n| \u003ca name=\"input_username\"\u003e\u003c/a\u003e [username](#input\\_username) | Name of the master user for the database in your RDS Instance | `string` | `\"admin\"` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_security_group\"\u003e\u003c/a\u003e [security\\_group](#output\\_security\\_group) | Security group of the RDS Instance |\n| \u003ca name=\"output_this\"\u003e\u003c/a\u003e [this](#output\\_this) | RDS Instance |\n\u003c!-- END_TF_DOCS --\u003e\n\n## Next Steps\n\n- Read Replicas\n- RDS Proxy\n\n## License\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nSee [LICENSE](LICENSE) for full details.\n\n```text\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpadok-team%2Fterraform-aws-rds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpadok-team%2Fterraform-aws-rds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpadok-team%2Fterraform-aws-rds/lists"}