-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
51 lines (43 loc) · 1.1 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
# variable "env" {
# type = string
# description = "Env to deploy to"
# default = "dev"
# }
# variable "prod" {
# type = string
# description = "Env to deploy to"
# default = "prod"
# }
variable "image" {
type = map
description = "image for container"
default = {
nodered = {
dev = "nodered/node-red:latest"
prod = "nodered/node-red:latest-minimal"
}
influxdb = {
dev = "quay.io/influxdb/influxdb:v2.0.2"
prod = "quay.io/influxdb/influxdb:v2.0.2"
}
}
}
variable "ext_port" {
type = map
# validation {
# condition = max(var.ext_port["dev"]...) <= 65535 && min(var.ext_port["dev"]...) >= 1880
# error_message = "The external port must be in the valid port range 0 - 65535 "
# }
# validation {
# condition = max(var.ext_port["prod"]...) <= 65535 && min(var.ext_port["prod"]...) > 1880
# error_message = "The external port must be in the valid port range 0 - 65535 "
# }
}
variable "int_port" {
type = number
default = 1880
validation {
condition = var.int_port == 1880
error_message = "The internal port must be 1880."
}
}