-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
283 lines (216 loc) · 5.67 KB
/
variables.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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
variable "prefix" {
description = "Prefix for Azure resources"
}
variable "azure_region" {
description = "Region to deploy Azure resources in"
}
variable "azure_tags" {
type = map(string)
description = "Tags to apply to Azure resources"
}
variable "subscription_id" {
description = "Azure Subscription ID"
sensitive = true
}
variable "tenant_id" {
description = "Azure Tenant ID"
sensitive = true
}
variable "administrative_groups" {
type = list(string)
description = "List of administrative groups"
}
variable "cluster_resource_group_name" {
description = "Name of resource group containing the AKS cluster"
}
variable "cluster_node_resource_group_name" {
description = "Name of resource group containing the AKS cluster nodes"
}
variable "kubernetes_identity_object_id" {
description = "Kubernetes identity object ID"
sensitive = true
}
variable "aks_system_subnet_id" {
description = "AKS System subnet ID"
sensitive = true
}
variable "dns_zone_name" {
description = "Name of the dns zone"
}
variable "dns_zone_id" {
description = "Azure DNS Zone ID"
sensitive = true
}
variable "dns_zone_resource_group_name" {
description = "Azure DNS Zone ID"
}
variable "dns_zone_subscription_id" {
description = "Azure DNS Zone ID"
sensitive = true
}
variable "load_balancer_subnet" {
description = "Load balancer subnet"
default = null
}
variable "infrastructure_pipeline_subnet_ids" {
type = list(string)
description = "Subnet ID of infrastructure pipeline"
default = []
}
# gatekeeper controller pods
variable "gk_replicas" {
}
variable "gk_limits_cpu" {
}
variable "gk_requests_cpu" {
}
variable "gk_limits_memory" {
}
variable "gk_requests_memory" {
}
# gatekeeper audit pods
variable "gk_audit_limits_cpu" {
}
variable "gk_audit_requests_cpu" {
}
variable "gk_audit_limits_memory" {
}
variable "gk_audit_requests_memory" {
}
# Grafana
variable "grafana_client_id" {
sensitive = true
}
variable "grafana_client_secret" {
sensitive = true
}
# KubeCost
variable "kubecost" {
type = object({
cluster_profile = string
token = string
product_key = string
shared_namespaces = list(string)
azure = object({
client_id = string
client_password = string
})
metric_relabelings = optional(string, "")
notifications = object({
global_slack_webhook_url = optional(string, "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX")
alerts = optional(string, <<-EOF
- type: budget
threshold: 100000000000000
window: 1d
aggregation: namespace
filter: default
EOF
)
})
})
}
# Vault
variable "vault_address" {
}
# Prometheus
variable "prometheus_disk_size" {
default = "80Gi"
}
variable "additional_alertmanagers" {
description = "List of additional Alertmanager targets for the Platform Prometheus"
type = list(string)
default = []
}
variable "prometheus_resources" {
description = "The limits and requests to set on the Prometheus pod."
type = object({
limits = optional(map(string), {}),
requests = optional(map(string), {}),
})
default = {
limits = {},
requests = {},
}
}
# Fluentd
variable "global_fluentd_config" {
description = "Global Fluentd config, usually used to define the default plugin"
default = <<EOF
<plugin default>
@type null
</plugin>
EOF
}
# Kiali
variable "kiali_grafana_token" {
sensitive = true
description = "The token used to authentiate Kiali to Grafana."
default = ""
}
# This needed to be objects instead of maps so that the kubernetes provider wouldn't complain.
variable "kiali_resources" {
description = "The limits and requests to set on the Kiali pod."
type = object({
limits = optional(object({
cpu = optional(string, "50m"),
memory = optional(string, "256Mi"),
}), {
cpu = "50m",
memory = "256Mi",
}),
requests = optional(object({
cpu = optional(string, "10m"),
memory = optional(string, "128Mi"),
}), {
cpu = "10m",
memory = "128Mi",
}),
})
default = {}
nullable = false
validation {
condition = var.kiali_resources.limits != null && var.kiali_resources.requests != null
error_message = "Limits and requests cannot be null."
}
validation {
condition = var.kiali_resources.limits.cpu != null && var.kiali_resources.limits.memory != null
error_message = "CPU and memory limits cannot be null."
}
validation {
condition = var.kiali_resources.requests.cpu != null && var.kiali_resources.requests.memory != null
error_message = "CPU and memory requests cannot be null."
}
}
variable "meshconfig_zipkin_address" {
description = "The URL to send zipkin compatible traces to"
default = "zipkin.istio-system:9411"
type = string
}
variable "meshconfig_enable_tracing" {
description = "Flag to control generation of trace spans and request IDs."
default = false
type = bool
}
# Argo Workflows
variable "argo_workflows_client_id" {
description = "The Client ID for Argo Workflows"
sensitive = true
}
variable "argo_workflows_client_secret" {
description = "The Client Secret for Argo Workflows"
sensitive = true
}
# Platform Event Logging
variable "logging_elasticsearch_url" {
description = "URL to elasticsearch for logging"
}
variable "logging_elasticsearch_username" {
description = "Elasticsearch username for logging"
default = ""
sensitive = true
}
variable "logging_elasticsearch_password" {
description = "Elasticsearch password for logging"
default = ""
sensitive = true
}