-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
164 lines (157 loc) · 3.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
# Resources for services
variable "loki_resources" {
description = "(Optional) Compute Resources required by loki container. CPU/RAM requests"
type = object(
{
request_cpu = optional(string)
request_memory = optional(string)
limit_cpu = optional(string)
limit_memory = optional(string)
}
)
default = {
request_cpu = "50m"
request_memory = "100Mi"
}
}
variable "promtail_resources" {
description = "(Optional) Compute Resources required by promtail container. CPU/RAM requests"
type = object(
{
request_cpu = optional(string)
request_memory = optional(string)
limit_cpu = optional(string)
limit_memory = optional(string)
}
)
default = {
request_cpu = "20m"
request_memory = "50Mi"
}
}
# Namespace
variable "namespace" {
description = "Namespace name"
type = string
default = "loki-stack"
}
variable "create_namespace" {
description = "Create namespace by module ? true or false"
type = bool
default = true
}
# Loki
variable "loki_name" {
type = string
default = "loki"
}
variable "loki_docker_image" {
type = string
default = "grafana/loki:2.7.4"
}
variable "loki_termination_grace_period_seconds" {
type = number
default = 4800
}
variable "loki_port" {
default = [
{
name = "http-metrics"
internal_port = 3100
external_port = 3100
}
]
}
variable "loki_node_selector" {
default = null
}
variable "loki_toleration" {
default = []
}
variable "loki_service_account_annotations" {
default = {}
}
# Promtail
variable "promtail_name" {
type = string
default = "promtail"
}
variable "promtail_docker_image" {
type = string
default = "grafana/promtail:2.7.4"
}
variable "promtail_internal_port" {
default = [
{
name = "http-metrics"
internal_port = "3101"
}
]
}
variable "promtail_toleration" {
default = []
}
variable "provider_type" {
description = "Choose what type of provider you want (aws, azure, gcp and local)" // SUPPORTS ONLY: aws, azure, gcp and local
type = string
}
# Storage variables
## AWS
variable "s3_region" {
type = string
description = "AWS region where s3 locate"
default = null
}
variable "s3_name" {
type = string
description = "Name of s3 bucket"
default = null
}
## GCP
variable "gcs_bucket_name" {
type = string
description = "Google Cloud Storage bucket name"
default = null
}
## Azure
variable "storage_account_name" {
type = string
description = "The Microsoft Azure storage account name to be used"
default = null
}
variable "storage_account_access_key" {
type = string
description = "The Microsoft Azure storage account access key to use"
default = null
}
variable "container_name" {
type = string
description = "Name of the blob container used to store chunks. This container must be created before running cortex."
default = null
}
## Local storage
variable "persistent_volume_name" {
type = string
description = "Name of persistant volume"
default = null
}
variable "persistent_volume_size" {
type = string
description = "Name of persistant disk size"
default = null
}
variable "pvc_access_modes" {
type = list(string)
description = "Mode for access to data"
default = null
}
variable "pvc_storage_class_name" {
type = string
description = "Type of storage class name"
default = null
}
variable "local_storage_retention_period" {
type = string
description = "How far back tables will be kept before they are deleted. 0s disables deletion"
default = "336h"
}