-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
74 lines (65 loc) · 2.66 KB
/
main.tf
File metadata and controls
74 lines (65 loc) · 2.66 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
module "networking" {
source = "./modules/networking"
environment = var.environment
}
module "rds" {
source = "./modules/rds"
environment = var.environment
db_username = var.db_username
db_password = var.db_password
private_subnet_ids = module.networking.private_subnet_ids
rds_sg_id = module.networking.rds_sg_id
}
module "monitoring" {
source = "./modules/monitoring"
environment = var.environment
rds_instance_id = module.rds.db_instance_id
}
module "waf" {
source = "./modules/waf"
environment = var.environment
}
module "efs" {
source = "./modules/efs"
environment = var.environment
cost_center = var.cost_center
vpc_id = module.networking.vpc_id
private_subnet_ids = module.networking.private_subnet_ids
application_security_group_id = module.networking.application_sg_id
performance_mode = var.efs_performance_mode
throughput_mode = var.efs_throughput_mode
provisioned_throughput_in_mibps = var.efs_provisioned_throughput
transition_to_ia = var.efs_transition_to_ia
metered_io_bytes_threshold = var.efs_metered_io_bytes_threshold
sns_topic_arn = module.monitoring.sns_topic_arn
tags = var.tags
}
module "backup" {
source = "./modules/backup"
environment = var.environment
cost_center = var.cost_center
backup_retention_days = var.backup_retention_days
weekly_backup_retention_days = var.weekly_backup_retention_days
monthly_backup_retention_days = var.monthly_backup_retention_days
cross_region_backup_vault_arn = var.cross_region_backup_vault_arn
rds_instance_arn = module.rds.db_instance_arn
efs_file_system_arn = module.efs.file_system_arn
sns_topic_arn = module.monitoring.sns_topic_arn
tags = var.tags
}
# Update monitoring module to include EFS metrics
module "monitoring" {
source = "./modules/monitoring"
environment = var.environment
aws_region = var.aws_region
rds_instance_id = module.rds.db_instance_id
waf_web_acl_name = module.waf.web_acl_name
cost_center = var.cost_center
alarm_email_endpoints = var.monitoring_email_endpoints
cpu_threshold = var.cpu_threshold
memory_threshold = var.memory_threshold
latency_threshold = var.latency_threshold
waf_blocked_threshold = var.waf_blocked_threshold
efs_file_system_id = module.efs.file_system_id
tags = var.tags
}