-
Notifications
You must be signed in to change notification settings - Fork 0
/
module.tf
109 lines (96 loc) · 2.9 KB
/
module.tf
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#README
#######################
#-----MODULE LIST-----#
#######################
#1. KUBE
#2. OPS
#3. PAGING
#4. SERVICE
#5. RDS
#6. RABBITMQ
#-----MONITOR MODULES-----#
module "kube" {
source = "./modules/kube/"
for_each = var.service
service = each.key
team = each.value.team
env = "prod"
alert_recipients = var.alert_recipients_testing
}
module "scaling_monitors" {
source = "./modules/scaling/"
for_each = var.hpa
hpa = each.key
team = each.value.team
env = "prod"
alert_recipients_testing = var.alert_recipients_testing
}
module "aws_autoscaling" {
source = "./modules/aws/"
for_each = var.aws_autoscaling
aws_autoscaling = each.key
alert_recipients_testing = var.alert_recipients_testing
}
module "cluster" {
source = "./modules/cluster/"
for_each = var.clusterName
clusterName = each.key
alert_recipients_testing = var.alert_recipients_testing
}
##-----paging monitors-----#
#module "paging" {
# source = "./modules/paging/paging.tf"
# recipients = var.alert_recipients["prod"][each.value.team]
#}
#-----service monitors-----#
module "service" {
source = "./modules/service/"
for_each = var.service
service = each.key
framework = each.value.framework
team = each.value.team
env = "prod"
alert_recipients_testing = var.alert_recipients_testing
alert_staging_testing = var.alert_staging_testing
#recipients = var.alert_recipients["prod"][each.value.team]
}
#-----rds modules-----#
module "rds_production_monitors" {
source = "./modules/rds/"
for_each = var.db_identifier
db_identifier = each.key
#alert_recipients = var.alert_recipients_testing
}
#module "rds_stage_monitor" {
# source = "./modules/rds/"
# for_each = var.db_identifier["stage_db"]
# alert_recipients = var.alert_recipients_testing
#}
#-----rabbitmq-----#
module "rabbitmq_monitor" {
source = "./modules/rabbitmq/"
for_each = var.rabbit_prod_pods
alert_recipients = var.alert_recipients_testing
rabbit_prod_pods = each.key
}
module "rabbitmq_staging_monitor" {
source = "./modules/rabbitmq/rabbitmq_staging/"
for_each = var.rabbit_stage_pods
alert_recipients = var.alert_recipients_testing
rabbit_stage_pods = each.key
}
###############
# DASHBOARDS #
###############
module "monitor_dashboards" {
source = "./dashboards/service/"
for_each = var.service
service = each.key
env = "prod"
}
#module "rds_dashboards" {
# source = "./dashboards/rds/"
# for_each = var.db_identifier
# service = each.key
# env = "prod"
#}