-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.tf
More file actions
57 lines (51 loc) · 2.25 KB
/
Copy pathdatabase.tf
File metadata and controls
57 lines (51 loc) · 2.25 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
52
53
54
55
56
57
module "rds_aurora_instance" {
source = "cloudposse/rds-cluster/aws"
version = "1.17.0"
namespace = "ohn"
stage = var.environment
name = var.app
db_name = var.app
admin_user = "postgres"
admin_password = random_password.database_master.result
db_port = 5432
storage_encrypted = true
egress_enabled = false
engine = "aurora-postgresql"
cluster_family = "aurora-postgresql15"
cluster_size = var.rds_cluster_size
instance_type = var.rds_aurora_instance_class
publicly_accessible = false
retention_period = 10
subnets = module.vpc.database_subnets
vpc_id = module.vpc.vpc_id
auto_minor_version_upgrade = true
allow_major_version_upgrade = false
apply_immediately = false
maintenance_window = "Mon:03:00-Mon:04:00"
copy_tags_to_snapshot = true
backup_window = "22:00-03:00"
kms_key_arn = module.kms_key.key_arn
performance_insights_kms_key_id = module.kms_key.key_arn
performance_insights_enabled = true
performance_insights_retention_period = 7
tags = local.tags
skip_final_snapshot = true
}
# Outputs
# ------------------------------------------------------------
output "instance_arn" {
value = module.rds_aurora_instance.arn
description = "ARN of the instance"
}
output "instance_address" {
value = module.rds_aurora_instance.endpoint
description = "DNS Endpoint of the instance"
}
output "read_only_instance_address" {
value = module.rds_aurora_instance.reader_endpoint
description = "DNS Endpoint of the instance"
}
output "database_security_group_id" {
value = module.rds_aurora_instance.security_group_id
description = "ID of the Security Group"
}