Created
March 3, 2019 20:22
-
-
Save 100daysofdevops/60013296d46346a79acb9acb213b5a87 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data "aws_kms_secret" "rds-secret" { | |
| "secret" { | |
| name = "master_password" | |
| payload = "payload value here" | |
| } | |
| } | |
| resource "aws_db_instance" "my_test_mysql" { | |
| allocated_storage = 20 | |
| storage_type = "gp2" | |
| engine = "mysql" | |
| engine_version = "5.7" | |
| instance_class = "${var.db_instance}" | |
| name = "myrdstestmysql" | |
| username = "admin" | |
| password = "${data.aws_kms_secret.rds-secret.master_password}" | |
| parameter_group_name = "default.mysql5.7" | |
| db_subnet_group_name = "${aws_db_subnet_group.rds-private-subnet.name}" | |
| vpc_security_group_ids = ["${aws_security_group.rds-sg.id}"] | |
| allow_major_version_upgrade = true | |
| auto_minor_version_upgrade = true | |
| backup_retention_period = 35 | |
| backup_window = "22:00-23:00" | |
| maintenance_window = "Sat:00:00-Sat:03:00" | |
| multi_az = true | |
| skip_final_snapshot = true | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment