eab4d3b466730f64d817dde364926a2432a30a57
[csit.git] / fdio.infra.terraform / 1n_nmd / prometheus / variables.tf
1 # Nomad
2 variable "datacenters" {
3   description = "Specifies the list of DCs to be considered placing this task"
4   type        = list(string)
5   default     = ["dc1"]
6 }
7
8 variable "region" {
9   description = "Specifies the list of DCs to be considered placing this task"
10   type        = string
11   default     = "global"
12 }
13
14 variable "volume_source" {
15   description = "The name of the volume to request"
16   type        = string
17   default     = "prod-volume-data1-1"
18 }
19
20 # Prometheus
21 variable "pm_version" {
22   description = "Prometheus version"
23   type        = string
24   default     = "2.33.1"
25 }
26
27 variable "auto_promote" {
28   description = "Specifies if the job should auto-promote to the canary version"
29   type        = bool
30   default     = true
31 }
32
33 variable "auto_revert" {
34   description = "Specifies if the job should auto-revert to the last stable job"
35   type        = bool
36   default     = true
37 }
38
39 variable "canary" {
40   description = "Equal to the count of the task group allows blue/green depl."
41   type        = number
42   default     = 1
43 }
44
45 variable "cpu" {
46   description = "CPU allocation"
47   type        = number
48   default     = 2000
49 }
50
51 variable "data_dir" {
52   description = "Prometheus DISK allocation"
53   type        = string
54   default     = "/data"
55 }
56
57 variable "group_count" {
58   description = "Specifies the number of the task groups running under this one"
59   type        = number
60   default     = 4
61 }
62
63 variable "job_name" {
64   description = "Specifies a name for the job"
65   type        = string
66   default     = "prometheus"
67 }
68
69 variable "max_parallel" {
70   description = "Specifies the maximum number of updates to perform in parallel"
71   type        = number
72   default     = 1
73 }
74
75 variable "memory" {
76   description = "Specifies the memory required in MB"
77   type        = number
78   default     = 4096
79 }
80
81 variable "port" {
82   description = "Specifies the static TCP/UDP port to allocate"
83   type        = number
84   default     = 9090
85 }
86
87 variable "service_name" {
88   description = "Specifies the name this service will be advertised in Consul"
89   type        = string
90   default     = "prometheus"
91 }
92
93 variable "use_canary" {
94   description = "Uses canary deployment"
95   type        = bool
96   default     = true
97 }
98
99 variable "use_host_volume" {
100   description = "Use Nomad host volume feature"
101   type        = bool
102   default     = true
103 }
104
105 variable "volume_destination" {
106   description = "Specifies where the volume should be mounted inside the task"
107   type        = string
108   default     = "/data/"
109 }
110
111 variable "vault_secret" {
112   type = object({
113     use_vault_provider        = bool,
114     vault_kv_policy_name      = string,
115     vault_kv_path             = string,
116     vault_kv_field_access_key = string,
117     vault_kv_field_secret_key = string
118   })
119   description = "Set of properties to be able to fetch secret from vault."
120   default = {
121     use_vault_provider        = false
122     vault_kv_policy_name      = "kv"
123     vault_kv_path             = "secret/data/prometheus"
124     vault_kv_field_access_key = "access_key"
125     vault_kv_field_secret_key = "secret_key"
126   }
127 }