|
1 | 1 | resource "aws_db_parameter_group" "rds_postgres_pg" { |
2 | | - name = var.parameter_group_name |
3 | | - family = "postgres9.6" |
4 | | - description = "TAMR RDS parameter group" |
5 | | - tags = var.additional_tags |
| 2 | + name = var.parameter_group_name |
| 3 | + family = "postgres9.6" |
| 4 | + description = "TAMR RDS parameter group" |
| 5 | + tags = var.additional_tags |
6 | 6 | } |
7 | 7 |
|
8 | 8 | module "rds_sg" { |
9 | | - source = "./modules/rds-postgres-sg" |
10 | | - spark_cluster_sg_ids = var.spark_cluster_sg_ids |
11 | | - tamr_vm_sg_id = var.tamr_vm_sg_id |
12 | | - vpc_id = var.vpc_id |
13 | | - security_group_name = var.security_group_name |
14 | | - additional_cidrs = var.additional_cidrs |
15 | | - additional_tags = var.additional_tags |
| 9 | + source = "./modules/rds-postgres-sg" |
| 10 | + spark_cluster_sg_ids = var.spark_cluster_sg_ids |
| 11 | + tamr_vm_sg_id = var.tamr_vm_sg_id |
| 12 | + vpc_id = var.vpc_id |
| 13 | + security_group_name = var.security_group_name |
| 14 | + additional_cidrs = var.additional_cidrs |
| 15 | + additional_tags = var.additional_tags |
16 | 16 | } |
17 | 17 |
|
18 | 18 | resource "aws_db_instance" "rds_postgres" { |
19 | | - name = var.postgres_name |
| 19 | + name = var.postgres_name |
20 | 20 |
|
21 | | - identifier_prefix = var.identifier_prefix |
22 | | - allocated_storage = var.allocated_storage |
23 | | - max_allocated_storage = var.max_allocated_storage |
24 | | - storage_type = var.storage_type |
25 | | - storage_encrypted = true |
| 21 | + identifier_prefix = var.identifier_prefix |
| 22 | + allocated_storage = var.allocated_storage |
| 23 | + max_allocated_storage = var.max_allocated_storage |
| 24 | + storage_type = var.storage_type |
| 25 | + storage_encrypted = true |
26 | 26 |
|
27 | | - engine = "postgres" |
28 | | - engine_version = "9.6" |
29 | | - instance_class = var.instance_class |
| 27 | + engine = "postgres" |
| 28 | + engine_version = "9.6" |
| 29 | + instance_class = var.instance_class |
30 | 30 |
|
31 | | - username = var.username |
32 | | - password = var.password |
| 31 | + username = var.username |
| 32 | + password = var.password |
33 | 33 |
|
34 | | - db_subnet_group_name = var.subnet_name |
35 | | - multi_az = true |
36 | | - publicly_accessible = false |
37 | | - vpc_security_group_ids = [module.rds_sg.rds_sg_id] |
38 | | - parameter_group_name = aws_db_parameter_group.rds_postgres_pg.name |
| 34 | + db_subnet_group_name = var.subnet_name |
| 35 | + multi_az = true |
| 36 | + publicly_accessible = false |
| 37 | + vpc_security_group_ids = [module.rds_sg.rds_sg_id] |
| 38 | + parameter_group_name = aws_db_parameter_group.rds_postgres_pg.name |
39 | 39 |
|
40 | | - maintenance_window = var.maintenance_window |
41 | | - backup_window = var.backup_window |
42 | | - backup_retention_period = var.backup_retention_period |
43 | | - skip_final_snapshot = var.skip_final_snapshot |
| 40 | + maintenance_window = var.maintenance_window |
| 41 | + backup_window = var.backup_window |
| 42 | + backup_retention_period = var.backup_retention_period |
| 43 | + skip_final_snapshot = var.skip_final_snapshot |
44 | 44 |
|
45 | | - apply_immediately = var.apply_immediately |
| 45 | + apply_immediately = var.apply_immediately |
46 | 46 |
|
47 | | - copy_tags_to_snapshot = var.copy_tags_to_snapshot |
48 | | - tags = var.additional_tags |
| 47 | + copy_tags_to_snapshot = var.copy_tags_to_snapshot |
| 48 | + tags = var.additional_tags |
49 | 49 |
|
50 | | - lifecycle { |
51 | | - ignore_changes = [password] |
52 | | - } |
| 50 | + lifecycle { |
| 51 | + ignore_changes = [password] |
| 52 | + } |
53 | 53 | } |
0 commit comments