forked from aarshsqaureops/terraform-rds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
43 lines (32 loc) · 945 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
provider "aws" {
region = "us-east-2"
}
module "db" {
source = "terraform-aws-modules/rds/aws"
identifier = "terraform-rds-aarsh"
engine = "mysql"
engine_version = "5.7.22"
instance_class = "db.t3.micro"
allocated_storage = 5
db_name = "demodb"
username = "admin"
password = "password"
port = "3306"
iam_database_authentication_enabled = true
vpc_security_group_ids = ["sg-0bd57eeb26da657dc"]
monitoring_interval = "30"
monitoring_role_name = "MyRDSMonitoringRole"
create_monitoring_role = true
tags = {
Name = "terraform-rds-aarsh"
#Owner = "user"
#Environment = "dev"
}
# DB subnet group
create_db_subnet_group = true
subnet_ids = ["subnet-0f538e3830ee89ae2", "subnet-0137f79e0f79ac457"]
# DB parameter group
family = "mysql5.7"
# DB option group
major_engine_version = "5.7"
}