-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathvariables.tf
161 lines (161 loc) · 3.46 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
variable "image" {
description = "Specify the image to start the container from. Can either be a repository/tag or a partial image ID"
type = string
default = null
}
variable "init" {
description = "If init process should be used as the PID 1 in the container"
type = bool
default = false
}
variable "existing_image" {
description = "Specify an existing image from another module"
type = string
default = null
}
variable "container_name" {
description = "Custom container name"
type = string
default = null
}
variable "hostname" {
description = "Set docker hostname"
type = string
default = null
}
variable "working_dir" {
description = "Working directory inside the container"
type = string
default = null
}
variable "restart_policy" {
description = "Restart policy. Default: no"
type = string
default = "no"
}
variable "privileged" {
description = "Give extended privileges to this container"
type = bool
default = false
}
variable "network_mode" {
description = "Specify a custom network mode"
type = string
default = null
}
variable "dns" {
description = "Set custom dns servers for the container"
type = list(string)
default = null
}
variable "entrypoint" {
description = "Override the default entrypoint"
type = list(string)
default = null
}
variable "command" {
description = "Override the default command"
type = list(string)
default = null
}
variable "ports" {
description = "Expose ports"
type = list(object({
internal = number
external = number
protocol = string
}))
default = null
}
variable "named_volumes" {
description = "Mount named volumes"
type = map(object({
container_path = string
read_only = bool
create = bool
}))
default = {}
}
variable "host_paths" {
description = "Mount host paths"
type = map(object({
container_path = string
read_only = bool
}))
default = {}
}
variable "volumes_from_containers" {
description = "Mount volumes from another container"
type = list(any)
default = null
}
variable "devices" {
description = "Device mappings"
type = map(object({
container_path = string
permissions = string
}))
default = {}
}
variable "capabilities" {
description = "Add or drop container capabilities"
type = object({
add = list(string)
drop = list(string)
})
default = null
}
variable "networks_advanced" {
description = <<EOD
Advanced network options for the container
```hcl
networks_advanced = [
{
name = "proxy-tier"
ipv4_address = "10.0.0.14"
},
{
name = "media-tier"
ipv4_address = "172.0.0.14"
}
]
```
EOD
type = any
default = null
}
variable "healthcheck" {
description = "Test to check if container is healthy"
type = object({
interval = string
retries = number
start_period = string
test = list(string)
timeout = string
})
default = null
}
variable "environment" {
description = "Add environment variables"
type = map(string)
default = null
}
variable "docker_networks" {
description = <<EOD
List of custom networks to create
```hcl
docker_networks = [
{
name = "proxy-tier"
ipam_config = {
aux_address = {}
gateway = "10.0.0.1"
subnet = "10.0.0.0/24"
}
}
]
```
EOD
type = any
default = []
}