https://github.com/cms-enterprise/batcave-tf-mysql
batCAVE MySQL Terraform module
https://github.com/cms-enterprise/batcave-tf-mysql
aws-rds aws-rds-mysql batcave mysql terraform terraform-module
Last synced: 2 months ago
JSON representation
batCAVE MySQL Terraform module
- Host: GitHub
- URL: https://github.com/cms-enterprise/batcave-tf-mysql
- Owner: CMS-Enterprise
- License: other
- Created: 2022-06-30T16:41:38.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-16T19:34:37.000Z (about 1 year ago)
- Last Synced: 2024-09-17T00:49:09.417Z (about 1 year ago)
- Topics: aws-rds, aws-rds-mysql, batcave, mysql, terraform, terraform-module
- Language: HCL
- Homepage: https://cloud.cms.gov/batcave-platform-service
- Size: 51.8 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# batcave-tf-mysql
This repository contains the Terraform code to create a MySQL database.
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.2 |
| [aws](#requirement\_aws) | >= 4.61.0 |## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 4.61.0 |## Modules
| Name | Source | Version |
|------|--------|---------|
| [aurora](#module\_aurora) | terraform-aws-modules/rds-aurora/aws | 6.1.4 |## Resources
| Name | Type |
|------|------|
| [aws_db_parameter_group.db_parameter_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_parameter_group) | resource |
| [aws_rds_cluster_parameter_group.db_cluster_parameter_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/rds_cluster_parameter_group) | resource |
| [aws_route53_record.www](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
| [aws_security_group_rule.db-egress-cluster_primary_security_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.db-egress-cluster_security_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.db-egress-worker_security_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [allowed\_security\_groups](#input\_allowed\_security\_groups) | n/a | `list(string)` | n/a | yes |
| [apply\_immediately](#input\_apply\_immediately) | n/a | `bool` | `false` | no |
| [auto\_minor\_version\_upgrade](#input\_auto\_minor\_version\_upgrade) | n/a | `bool` | `true` | no |
| [backup\_retention\_period](#input\_backup\_retention\_period) | The days to retain backups for. Default `7` | `number` | `35` | no |
| [ca\_cert\_identifier](#input\_ca\_cert\_identifier) | Specifies the identifier of the CA certificate for the DB instance | `string` | `"rds-ca-rsa2048-g1"` | no |
| [cluster\_primary\_security\_group\_id](#input\_cluster\_primary\_security\_group\_id) | n/a | `string` | n/a | yes |
| [cluster\_security\_group\_id](#input\_cluster\_security\_group\_id) | n/a | `string` | n/a | yes |
| [create\_db\_subnet\_group](#input\_create\_db\_subnet\_group) | n/a | `bool` | `true` | no |
| [create\_security\_group](#input\_create\_security\_group) | n/a | `bool` | `true` | no |
| [database\_name](#input\_database\_name) | n/a | `string` | n/a | yes |
| [db\_cluster\_parameter\_group\_parameters](#input\_db\_cluster\_parameter\_group\_parameters) | n/a | `list(map(string))` |[| no |
{
"name": "group_concat_max_len",
"value": "4096"
}
]
| [db\_parameter\_group\_parameters](#input\_db\_parameter\_group\_parameters) | n/a | `list(map(string))` |[| no |
{
"name": "general_log",
"value": "1"
},
{
"name": "group_concat_max_len",
"value": "4096"
},
{
"name": "log_bin_trust_function_creators",
"value": "1"
},
{
"name": "max_allowed_packet",
"value": "1073741824"
},
{
"name": "transaction_isolation",
"value": "READ-COMMITTED"
}
]
| [enabled\_cloudwatch\_logs\_exports](#input\_enabled\_cloudwatch\_logs\_exports) | n/a | `list(any)` |[| no |
"audit",
"error",
"general",
"slowquery"
]
| [engine](#input\_engine) | n/a | `string` | `"aurora-mysql"` | no |
| [engine\_version](#input\_engine\_version) | n/a | `string` | `"8.0"` | no |
| [iam\_database\_authentication\_enabled](#input\_iam\_database\_authentication\_enabled) | n/a | `bool` | `true` | no |
| [instance\_class](#input\_instance\_class) | n/a | `string` | `"db.r5.xlarge"` | no |
| [master\_username](#input\_master\_username) | n/a | `string` | n/a | yes |
| [name](#input\_name) | n/a | `string` | n/a | yes |
| [publicly\_accessible](#input\_publicly\_accessible) | n/a | `string` | `"false"` | no |
| [route53\_record\_name](#input\_route53\_record\_name) | n/a | `string` | n/a | yes |
| [route53\_zone\_id](#input\_route53\_zone\_id) | n/a | `string` | n/a | yes |
| [security\_group\_allowed\_cidrs](#input\_security\_group\_allowed\_cidrs) | n/a | `list(string)` | `[]` | no |
| [skip\_final\_snapshot](#input\_skip\_final\_snapshot) | n/a | `bool` | `false` | no |
| [snapshot\_identifier](#input\_snapshot\_identifier) | If specified creates this database from a snapshot. Default is null. Be warned that modifying this value on an already created database _WILL_ destroy/recreate the whole cluster. | `string` | `null` | no |
| [subnets](#input\_subnets) | n/a | `list(string)` | n/a | yes |
| [tags](#input\_tags) | n/a | `map(string)` |{| no |
"Owner": "Batcave"
}
| [vpc\_id](#input\_vpc\_id) | n/a | `string` | n/a | yes |
| [worker\_security\_group\_id](#input\_worker\_security\_group\_id) | n/a | `string` | n/a | yes |## Outputs
| Name | Description |
|------|-------------|
| [additional\_cluster\_endpoints](#output\_additional\_cluster\_endpoints) | A map of additional cluster endpoints and their attributes |
| [cluster\_arn](#output\_cluster\_arn) | Amazon Resource Name (ARN) of cluster |
| [cluster\_database\_name](#output\_cluster\_database\_name) | Name for an automatically created database on cluster creation |
| [cluster\_endpoint](#output\_cluster\_endpoint) | Writer endpoint for the cluster |
| [cluster\_engine\_version\_actual](#output\_cluster\_engine\_version\_actual) | The running version of the cluster database |
| [cluster\_hosted\_zone\_id](#output\_cluster\_hosted\_zone\_id) | The Route53 Hosted Zone ID of the endpoint |
| [cluster\_id](#output\_cluster\_id) | The RDS Cluster Identifier |
| [cluster\_instances](#output\_cluster\_instances) | A map of cluster instances and their attributes |
| [cluster\_master\_password](#output\_cluster\_master\_password) | The database master password |
| [cluster\_master\_username](#output\_cluster\_master\_username) | The database master username |
| [cluster\_members](#output\_cluster\_members) | List of RDS Instances that are a part of this cluster |
| [cluster\_port](#output\_cluster\_port) | The database port |
| [cluster\_reader\_endpoint](#output\_cluster\_reader\_endpoint) | A read-only endpoint for the cluster, automatically load-balanced across replicas |
| [cluster\_resource\_id](#output\_cluster\_resource\_id) | The RDS Cluster Resource ID |
| [cluster\_role\_associations](#output\_cluster\_role\_associations) | A map of IAM roles associated with the cluster and their attributes |
| [db\_subnet\_group\_name](#output\_db\_subnet\_group\_name) | The db subnet group name |
| [enhanced\_monitoring\_iam\_role\_arn](#output\_enhanced\_monitoring\_iam\_role\_arn) | The Amazon Resource Name (ARN) specifying the enhanced monitoring role |
| [enhanced\_monitoring\_iam\_role\_name](#output\_enhanced\_monitoring\_iam\_role\_name) | The name of the enhanced monitoring role |
| [enhanced\_monitoring\_iam\_role\_unique\_id](#output\_enhanced\_monitoring\_iam\_role\_unique\_id) | Stable and unique string identifying the enhanced monitoring role |
| [security\_group\_id](#output\_security\_group\_id) | The security group ID of the cluster |