generated from Skatteetaten/vagrant-hashistack-template
-
Notifications
You must be signed in to change notification settings - Fork 5
/
variables.tf
148 lines (135 loc) · 3.48 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
# Nomad
variable "nomad_datacenters" {
type = list(string)
description = "Nomad data centers"
default = ["dc1"]
}
variable "nomad_namespace" {
type = string
description = "[Enterprise] Nomad namespace"
default = "default"
}
variable "local_docker_image" {
type = bool
description = "Switch for nomad jobs to use artifact for image lookup"
default = false
}
# Hive
variable "use_canary" {
type = bool
description = "Uses canary deployment for Hive"
default = false
}
variable "hive_service_name" {
type = string
description = "Hive service name"
default = "hive-metastore"
}
variable "consul_docker_image" {
type = string
description = "Consul docker image"
default = "consul:1.9"
}
variable "hive_container_port" {
type = number
description = "Hive port"
default = 9083
}
variable "hive_docker_image" {
type = string
description = "Hive docker image"
default = "fredrikhgrelland/hive:3.1.0"
}
variable "hive_container_environment_variables" {
type = list(string)
description = "Hive environment variables"
default = [""]
}
variable "hive_bucket" {
type = object({
default = string,
hive = string
})
description = "Hive requires minio buckets"
}
variable "resource" {
type = object({
cpu = number,
memory = number
})
default = {
cpu = 500,
memory = 1024
}
description = "Hive resources"
}
variable "resource_proxy" {
type = object({
cpu = number,
memory = number
})
default = {
cpu = 200,
memory = 128
}
description = "Hive proxy resources"
validation {
condition = var.resource_proxy.cpu >= 200 && var.resource_proxy.memory >= 128
error_message = "Proxy resource must be at least: cpu=200, memory=128."
}
}
# Minio
variable "minio_service" {
type = object({
service_name = string
port = number
access_key = string
secret_key = string
})
description = "Minio data-object contains service_name, port, access_key and secret_key"
}
variable "minio_vault_secret" {
type = object({
use_vault_provider = bool
vault_kv_policy_name = string
vault_kv_path = string
vault_kv_field_access_key = string
vault_kv_field_secret_key = string
})
description = "Set of properties to be able to fetch secret from vault"
default = {
use_vault_provider = false
vault_kv_policy_name = "kv-secret"
vault_kv_path = "secret/path/to/minio/creds"
vault_kv_field_access_key = "access_key"
vault_kv_field_secret_key = "secret_key"
}
}
# Postgres
variable "postgres_service" {
type = object({
service_name = string
port = number
database_name = string
username = string
password = string
})
description = "Postgres data-object contains service_name, port, database_name, username and password"
}
variable "postgres_vault_secret" {
type = object({
use_vault_provider = bool
vault_kv_policy_name = string
vault_kv_path = string
vault_kv_field_username = string
vault_kv_field_password = string
})
description = "Set of properties to be able to fetch secret from vault"
default = {
use_vault_provider = false
vault_kv_policy_name = "kv-secret"
vault_kv_path = "secret/path/to/postgres/creds"
vault_kv_field_username = "username"
vault_kv_field_password = "password"
}
}