-
Notifications
You must be signed in to change notification settings - Fork 4
/
input.tf
183 lines (167 loc) · 5.97 KB
/
input.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
variable "monitoring_instance_name" {
description = "Name used as suffix on all created resources to identify the deployment uniquely"
}
variable "monitoring_org_name" {
description = "Cloud foundry organisation where the monitoring solution is deployed"
}
variable "monitoring_space_name" {
description = "Cloud foundry space where the monitoring solution is deployed"
}
variable "paas_exporter_username" {
description = "Readonly cloud foundry user to query cloud foundry metrics. It must have BillingManager org role and SpaceAuditor space role on all the monitored spaces."
default = ""
}
variable "paas_exporter_password" {
description = "Readonly cloud foundry user password"
default = ""
sensitive = true
}
variable "alertmanager_config" {
description = "Alert manager configuration file (https://prometheus.io/docs/alerting/latest/configuration/). Passed as a long string."
default = ""
}
variable "alertmanager_slack_url" {
description = "Slack webhook URL for alert notifications"
default = ""
}
variable "alertmanager_slack_channel" {
description = "DEPRECATED. Slack channel for alert notifications. This is unnecessary if the webhook in alertmanager_slack_url has been assigned to a channel."
default = ""
}
variable "alertmanager_slack_receivers" {
type = map(string)
default = {}
}
variable "alertmanager_slack_template" {
description = "Slack message template for alert notifications"
default = ""
}
variable "alert_rules" {
description = "Prometheus alert rules file (https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/). Passed as a long string."
default = ""
}
variable "postgres_dashboard_url" {
description = "Grafana dashboard url for Postgres"
default = ""
}
variable "apps_dashboard_url" {
description = "Grafana dashboard url for apps"
default = ""
}
variable "grafana_google_client_id" {
description = "Google client id for Grafana Google single-sign-on"
default = ""
}
variable "grafana_google_client_secret" {
description = "Google client secret for Grafana Google single-sign-on"
default = ""
}
variable "grafana_admin_password" {
description = "Grafana administrator password (User: admin)"
}
variable "grafana_json_dashboards" {
description = <<-DESCRIPTION
Additional Grafana dashboards. Passed as a list of long json strings.
The dashboard can be exported as json from Grafana UI: https://grafana.com/docs/grafana/latest/dashboards/export-import/"
DESCRIPTION
default = []
}
variable "grafana_extra_datasources" {
description = <<-DESCRIPTION
Additional Grafana data sources. Passed as a list of long yaml strings.
See https://grafana.com/docs/grafana/latest/administration/provisioning/#data-sources
DESCRIPTION
default = []
}
variable "grafana_google_jwt" {
description = "Google JWT token for Grafana Google sheet data source"
default = ""
}
variable "grafana_runtime_version" {
description = "Override default Grafana version. See Grafana module for current default version."
default = ""
}
variable "grafana_elasticsearch_credentials" {
description = "Credentials for Grafana Elasticserach datasource. Map of {url, username, password}."
type = map(any)
default = {
url = ""
username = ""
password = ""
}
}
variable "grafana_anonymous_auth" {
description = "Enable anonymous readonly access to Grafana"
default = false
}
variable "docker_credentials" {
description = "Credentials for Dockerhub. Map of {username, password}."
type = map(any)
default = {
username = ""
password = ""
}
}
variable "prometheus_memory" {
description = "Override default prometheus application allocated memory. See Prometheus module for current default value."
default = ""
}
variable "prometheus_disk_quota" {
description = "Override default prometheus application allocated disk space. See Prometheus module for current default value."
default = ""
}
variable "influxdb_service_plan" {
description = "Influxdb PaaS service plan. Run 'cf marketplace' to see available plans."
default = "tiny-1_x"
}
variable "redis_services" {
description = "List of redis services for advanced monitoring and dashboard. [\"space1/redis1\", \"space2/redis2\", ...]"
default = []
}
variable "postgres_services" {
description = "List of postgres services for advanced monitoring and dashboard. [\"space1/postgres1\", \"space2/postgres2\", ...]"
default = []
}
variable "alertable_postgres_services" {
description = "List of postgres services that will have alerting enabled. [\"space1/postgres1\", \"space2/postgres2\", ...]"
default = {}
}
variable "alertable_apps" {
description = "List of apps that will have alerting enabled. [\"app1\", \"app2\", ...]"
default = {}
}
variable "external_exporters" {
description = "List of extra Prometheus exporter domains. Prometheus will scrape each domain via https at /metrics path."
default = []
}
variable "internal_apps" {
description = "List internal PaaS applications providing metrics. Prometheus will scrape each app instance at '/metrics' path"
default = []
}
variable "enabled_modules" {
description = "List of prometheus_all modules. Add them one by one to make onboarding easier."
type = list(any)
default = [
"paas_prometheus_exporter",
"prometheus",
"grafana",
"alertmanager",
"influxdb",
"billing_prometheus_exporter"
]
}
variable "enable_prometheus_yearly" {
default = false
}
locals {
list_of_redis_exporters = [for redis_module in module.redis_prometheus_exporter : redis_module.exporter]
list_of_postgres_exporters = [for postgres_module in module.postgres_prometheus_exporter : postgres_module.exporter]
list_of_external_exporters = [for endpoint in var.external_exporters :
{
endpoint = endpoint
name = endpoint
scheme = "https"
}
]
prometheus_yearly_endpoint = var.enable_prometheus_yearly ? module.prometheus_yearly[0].endpoint : ""
}