{"id":26009974,"url":"https://github.com/byu-oit/terraform-aws-rds","last_synced_at":"2026-06-06T15:32:22.204Z","repository":{"id":45855111,"uuid":"232439693","full_name":"byu-oit/terraform-aws-rds","owner":"byu-oit","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-13T20:22:12.000Z","size":118,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":21,"default_branch":"main","last_synced_at":"2024-06-14T20:32:16.707Z","etag":null,"topics":["standard","terraform-module"],"latest_commit_sha":null,"homepage":null,"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/byu-oit.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":"2020-01-07T23:53:51.000Z","updated_at":"2024-06-14T20:32:16.708Z","dependencies_parsed_at":"2023-02-12T07:00:30.439Z","dependency_job_id":"1f5ba377-6693-4f5b-8f5c-b7dc5b1044f7","html_url":"https://github.com/byu-oit/terraform-aws-rds","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byu-oit%2Fterraform-aws-rds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byu-oit%2Fterraform-aws-rds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byu-oit%2Fterraform-aws-rds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byu-oit%2Fterraform-aws-rds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byu-oit","download_url":"https://codeload.github.com/byu-oit/terraform-aws-rds/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242112767,"owners_count":20073666,"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":["standard","terraform-module"],"created_at":"2025-03-05T22:26:43.797Z","updated_at":"2025-03-05T22:26:44.402Z","avatar_url":"https://github.com/byu-oit.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Latest GitHub Release](https://img.shields.io/github/v/release/byu-oit/terraform-aws-rds?sort=semver)\n\n# Terraform AWS RDS\nThis terraform deploys an RDS instance.\n \n## Usage\n```hcl\nmodule \"rds\" {\n  source = \"github.com/byu-oit/terraform-aws-rds?ref=v3.2.0\"\n\n  identifier              = \"example\"\n  engine                  = \"mysql\"\n  engine_version          = \"8.0\"\n  family                  = \"mysql8.0\"\n  cloudwatch_logs_exports = [\"error\", \"general\", \"slowquery\"]\n\n  db_name           = \"example\"\n  subnet_ids        = module.acs.data_subnet_ids\n  subnet_group_name = module.acs.db_subnet_group_name\n  vpc_id            = module.acs.vpc.id\n}\n```\n\n## Requirements\n* Terraform version 1.0.0 or greater\n* AWS Provider version 4.0 or greater\n\n## Inputs\n| Name                                  | Type                            | Description                                                                                                                                                                                                                                                                                                        | Default                                                                               |\n|---------------------------------------|---------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|\n| `identifier`                          | string                          | Identifier for the RDS instance                                                                                                                                                                                                                                                                                    |                                                                                       |\n| `instance_class`                      | string                          | The instance class the RDS instance will use                                                                                                                                                                                                                                                                       | db.t2.small                                                                           |\n| `engine`                              | string                          | The database engine the RDS instance will use                                                                                                                                                                                                                                                                      |                                                                                       |\n| `engine_version`                      | string                          | The engine version to use                                                                                                                                                                                                                                                                                          |                                                                                       |\n| `family`                              | string                          | The family of the DB parameter group. According to the [AWS Docs](https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-parameter-group.html), you can list all of the available parameter group families with `aws rds describe-db-engine-versions --query \"DBEngineVersions[].DBParameterGroupFamily\"`. |                                                                                       |\n| `db_security_group_name`              | string                          | The (optional) name of the security group to be created for the RDS instance.                                                                                                                                                                                                                                      | ${var.identifier}-db_sg                                                               |\n| `db_security_group_description`       | string                          | The (optional) description of the security group to be created for the RDS instance.                                                                                                                                                                                                                               | \"Security group for ${var.identifier} RDS instance\"                                                                 |\n| `db_name`                             | string                          | The name of the database that RDS will create                                                                                                                                                                                                                                                                      |                                                                                       |\n| `ssm_prefix`                          | string                          | The SSM Parameter Store Prefix to use when creating the master username and password.                                                                                                                                                                                                                              | identifier                                                                            |\n| `master_username`                     | string                          | The master username to be used for the RDS instance. If not provided, a random one will be generated (see [below](#master_usernamemaster_password)).                                                                                                                                                               | null                                                                                  |\n| `master_password`                     | string                          | The master password to be used for the RDS instnace. If not provided, a random one will be generated (see [below](#master_usernamemaster_password)).                                                                                                                                                               | null                                                                                  |\n| `allocated_storage`                   | number                          | The amount of storage to be allocated for the database. If `max_allocated_storage` is configured, this argument represents the initial storage allocation and differences from the configuration will be ignored automatically when Storage Autoscaling occurs.                                                    | 32                                                                                    |\n| `max_allocated_storage`               | number                          | The max amount of storage for the database. Used for storage autoscaling.                                                                                                                                                                                                                                          | null                                                                                  |\n| `storage_type`                        | string                          | Storage type for the database [standard, gp2]                                                                                                                                                                                                                                                                      | gp2                                                                                   |\n| `storage_encrypted`                   | bool                            | Specifies whether the DB instance is encrypted                                                                                                                                                                                                                                                                     | true                                                                                  |\n| `vpc_id`                              | string                          | VPC ID to put the RDS instance on                                                                                                                                                                                                                                                                                  |                                                                                       |\n| `subnet_ids`                          | list(string)                    | A list of VPC subnet IDs to put the RDS instance on                                                                                                                                                                                                                                                                |                                                                                       |\n| `subnet_group_name`                   | string                          | Database subnet group name (can be retrieved from acs-info)                                                                                                                                                                                                                                                        |                                                                                       |\n| `deletion_protection`                 | bool                            | If the DB instance should have deletion protection enabled. The database can't be deleted when this value is set to true                                                                                                                                                                                           | true                                                                                  |\n| `skip_final_snapshot`                 | boolean                         | If set to true, no final snapshot of the database will be made when its deleted.                                                                                                                                                                                                                                   | false                                                                                 |\n| `cloudwatch_logs_exports`             | list(string)                    | List of log types to enable for exporting to CloudWatch logs. Each engine has different [valid values](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html). We strongly recommend adding at least the `audit` log where possible.                                                          |                                                                                       |\n| `log_retention_in_days`               | number                          | CloudWatch log groups retention in days                                                                                                                                                                                                                                                                            | 120                                                                                   |\n| `backup_retention_period`             | number                          | The days to retain backups for. Must be between 0 and 35. Must be greater than 0 if the database is used as a source for a Read Replica.                                                                                                                                                                           | 7                                                                                     |\n| `backup_window`                       | string                          | The daily time range (in UTC) during which automated backups are created if they are enabled. Syntax: \"hh24:mi-hh24:mi\". Eg: \"09:46-10:16\". Must not overlap with maintenance_window.                                                                                                                              | 07:01-07:31 (this is either midnight or 1am Mountain Time, depending on daylight savings) |\n| `maintenance_window`                  | string                          | The window to perform maintenance in. Syntax: \"ddd:hh24:mi-ddd:hh24:mi\". Eg: \"Mon:00:00-Mon:03:00\".                                                                                                                                                                                                                | null                                                                                  |\n| `multi_az`                            | bool                            | If the RDS instance is multi AZ enabled.                                                                                                                                                                                                                                                                           | false                                                                                 |\n| `iam_database_authentication_enabled` | bool                            | If IAM authentication is enabled.                                                                                                                                                                                                                                                                                  | false                                                                                 |\n| `security_group_ids`                  | list(string)                    | A list of security group ids of security groups to attach to the RDS instance. This is in addition to the security group created in the module.                                                                                                                                                                    | []                                                                                    |\n| `parameter_group_parameters`          | map(string)                     | Map of parameters to include in the database parameter group                                                                                                                                                                                                                                                       | {}                                                                                    |\n| `performance_insights`                | [object](#performance_insights) | If the object is not null performance insights is turned on and configured with the parameter(s) in the object                                                                                                                                                                                                     | null                                                                                  |\n| `tags`                                | map(string)                     | A map of AWS Tags to attach to each resource created                                                                                                                                                                                                                                                               | {}                                                                                    |\n| `ca_cert_identifier`                  | string                          | The identifier of the CA certificate for the DB instance.                                                                                                                                                                                                                                                          | null                                                                                  |\n\n#### performance_insights\n* **`retention_period_days`** - The number of days to retain. Setting to null will default the resource default of 7 days\n\n#### master_username/master_password\nYou can provide your own username and password, but please **DO NOT COMMIT** your password to source code.\n\nIf you do not provide your own `master_username` or `master_password` then this module will create a random one for you.\n\nIn both cases the username and passwords will be stored in SSM Parameter store and available via [outputs](#outputs).\n\n## Outputs\n| Name                        | Type                                                                                             | Description                                              |\n| --------------------------- | ------------------------------------------------------------------------------------------------ | -------------------------------------------------------- |\n| `instance`                  | [object](https://www.terraform.io/docs/providers/aws/r/db_instance.html#attributes-reference)    | The RDS Instance object                                  |\n| `security_group`            | [object](https://www.terraform.io/docs/providers/aws/r/security_group.html#attributes-reference) | The security group for the RDS Instance                  |\n| `master_username_parameter` | [object](https://www.terraform.io/docs/providers/aws/r/ssm_parameter.html#attributes-reference)  | SSM parameter object of the RDS database master username |\n| `master_password_parameter` | [object](https://www.terraform.io/docs/providers/aws/r/ssm_parameter.html#attributes-reference)  | SSM parameter object of the RDS database password        |\n| `parameter_group`           | [object](https://www.terraform.io/docs/providers/aws/r/aws_db_parameter_group.html#attributes-reference) | The RDS Parameter group assigned to the RDS instance |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyu-oit%2Fterraform-aws-rds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyu-oit%2Fterraform-aws-rds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyu-oit%2Fterraform-aws-rds/lists"}