-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaurora.tf
More file actions
52 lines (42 loc) · 1.45 KB
/
aurora.tf
File metadata and controls
52 lines (42 loc) · 1.45 KB
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
44
45
46
47
48
49
50
51
resource "aws_rds_cluster" "aurora_psql_cluster" {
cluster_identifier = "aurora-psql-cluster"
engine = "aurora-postgresql"
master_username = var.aurora_admin_username
master_password = var.aurora_admin_password
db_subnet_group_name = aws_db_subnet_group.aurora_private_subnets.name
vpc_security_group_ids = [aws_security_group.aurora_sg.id]
skip_final_snapshot = true
tags = {
Name = "aurora-psql-cluster"
}
}
resource "aws_rds_cluster_instance" "aurora-rds-instance-0" {
cluster_identifier = aws_rds_cluster.aurora_psql_cluster.id
instance_class = "db.t3.medium"
engine = aws_rds_cluster.aurora_psql_cluster.engine
engine_version = "15.4"
availability_zone = var.azs[0]
tags = {
Name = "aurora-instance"
}
}
resource "aws_rds_cluster_instance" "aurora-rds-instance-1" {
cluster_identifier = aws_rds_cluster.aurora_psql_cluster.id
instance_class = "db.t3.medium"
engine = aws_rds_cluster.aurora_psql_cluster.engine
engine_version = "15.4"
availability_zone = var.azs[1]
tags = {
Name = "aurora-instance"
}
}
resource "aws_rds_cluster_instance" "aurora-rds-instance-2" {
cluster_identifier = aws_rds_cluster.aurora_psql_cluster.id
instance_class = "db.t3.medium"
engine = aws_rds_cluster.aurora_psql_cluster.engine
engine_version = "15.4"
availability_zone = var.azs[2]
tags = {
Name = "aurora-instance"
}
}