|
1 | 1 | resource "aws_db_instance" "dino_park_packs_db" { |
2 | | - identifier = "dino-park-packs-db-${var.environment}-${var.region}" |
3 | | - allocated_storage = 10 |
4 | | - max_allocated_storage = 100 |
5 | | - storage_type = "gp2" |
6 | | - engine = "postgres" |
7 | | - engine_version = "11" |
8 | | - instance_class = "db.t3.micro" |
9 | | - allow_major_version_upgrade = true |
10 | | - username = "dinopark" |
11 | | - password = "oneTimePassword" |
12 | | - db_subnet_group_name = aws_db_subnet_group.dino_park_packs_db.id |
13 | | - vpc_security_group_ids = [aws_security_group.dino_park_packs_db.id] |
| 2 | + identifier = "dino-park-packs-db-${var.environment}-${var.region}" |
| 3 | + allocated_storage = 10 |
| 4 | + max_allocated_storage = 100 |
| 5 | + storage_type = "gp2" |
| 6 | + engine = "postgres" |
| 7 | + engine_version = "11" |
| 8 | + instance_class = "db.t3.micro" |
| 9 | + allow_major_version_upgrade = true |
| 10 | + username = "dinopark" |
| 11 | + password = "oneTimePassword" |
| 12 | + db_subnet_group_name = aws_db_subnet_group.dino_park_packs_db.id |
| 13 | + vpc_security_group_ids = [aws_security_group.dino_park_packs_db.id] |
| 14 | + iam_database_authentication_enabled = true |
| 15 | + # Saturdays, at 3:00 AM (UTC); 7:00 PM (PST); 10:00 PM (EST) to |
| 16 | + # 5:00 AM (UTC); 9:00 PM (PST); 12:00 AM (EST), respectively. |
| 17 | + maintenance_window = "Sat:03:00-Sat:05:00" |
| 18 | + # Backup every day at 2:00 AM (UTC); 6:00 PM (PST); 9:00 PM (EST) to |
| 19 | + # 2:59 AM (UTC); 6:69 PM (PST); 9:59 PM (EST), respectively. |
| 20 | + backup_window = "02:00-02:59" |
| 21 | + backup_retention_period = "15" # days |
| 22 | + copy_tags_to_snapshot = true |
14 | 23 | } |
15 | 24 |
|
16 | 25 | resource "aws_db_subnet_group" "dino_park_packs_db" { |
17 | | - name = "dino-park-packs-db-${var.environment}-${var.region}" |
| 26 | + name = "dino-park-packs-db-${var.environment}-${var.region}" |
18 | 27 | description = "Subnet for DinoPark test DB" |
19 | 28 | subnet_ids = flatten([data.terraform_remote_state.vpc.outputs.private_subnets]) |
20 | 29 | } |
21 | 30 |
|
22 | 31 | resource "aws_security_group" "dino_park_packs_db" { |
23 | | - name = "dino-park-packs-db-${var.environment}-${var.region}" |
| 32 | + name = "dino-park-packs-db-${var.environment}-${var.region}" |
24 | 33 | vpc_id = data.terraform_remote_state.vpc.outputs.vpc_id |
25 | 34 |
|
26 | 35 | ingress { |
|
0 commit comments