-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.tf
57 lines (54 loc) · 1.05 KB
/
config.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
locals {
config_map_name = var.environment != null ? "${var.environment}-proxy-config" : "proxy-config"
tiers = [
{
"name" = "0",
"max_connections" = 2
"rates" = [
{
"interval" = "1m",
"limit" = 500
}
]
},
{
"name" = "1",
"max_connections" = 5
"rates" = [
{
"interval" = "1m",
"limit" = 500
}
]
},
{
"name" = "2",
"max_connections" = 250
"rates" = [
{
"interval" = "1m",
"limit" = 500
}
]
},
{
"name" = "3",
"max_connections" = 450
"rates" = [
{
"interval" = "1m",
"limit" = 1500
}
]
}
]
}
resource "kubernetes_config_map" "proxy" {
metadata {
namespace = var.namespace
name = local.config_map_name
}
data = {
"tiers.toml" = "${templatefile("${path.module}/proxy-config.toml.tftpl", { tiers = local.tiers })}"
}
}