-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
90 lines (77 loc) · 1.96 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
variable "waypoint_application" {
type = string
description = "Name of application"
}
variable "application_port" {
type = number
description = "Port of application"
}
variable "application_count" {
type = number
description = "Number of instances for application"
}
variable "node_pool" {
type = string
description = "Node pool for application"
}
variable "driver" {
type = string
description = "Nomad driver to run application"
default = "docker"
validation {
condition = contains(["exec", "docker"], var.driver)
error_message = "Must be of `exec` or `docker` driver"
}
}
variable "cpu" {
type = number
description = "CPU for application"
default = 20
}
variable "memory" {
type = number
description = "Memory for application"
default = 10
}
variable "command" {
type = string
description = "Command to run application"
default = null
}
variable "args" {
type = list(string)
description = "Arguments to pass to command when running application"
default = null
}
variable "metadata" {
type = map(string)
description = "Additional metadata for application"
default = {}
}
variable "environment_variables" {
type = map(string)
description = "Environment variables for application"
default = {}
}
variable "image" {
type = string
description = "Container image for application"
}
variable "service_provider" {
type = string
description = "Nomad service provider, must be consul or nomad"
validation {
condition = contains(["consul", "nomad"], var.service_provider)
error_message = "Must be of `consul` or `nomad` provider"
}
}
variable "applications" {
type = map(object({
waypoint_clues = string
nomad_clues = string
node_pool = string
port = number
}))
description = "Applications and configuration attributes"
default = null
}