-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
109 lines (93 loc) · 3.11 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
###########
# Docker
###########
variable "registry" {
description = "Registry Name to push the Image"
type = string
default = "registry-1.docker.io"
}
variable "name" {
description = "A unique name for your Image"
type = string
}
variable "add_latest_tag" {
description = "Add latest tag to the Image. If false, it's necessary to add at least one tag on 'variable.tags'."
type = bool
default = true
}
variable "tags" {
description = "Optionally a tags to add to the Image"
type = list(string)
default = []
}
variable "keep_locally" {
description = "If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation."
type = bool
default = false
}
variable "keep_remotely" {
description = "If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker registry on destroy operation."
type = bool
default = false
}
variable "force_remove" {
description = " If true, then the image is removed forcibly when the resource is destroyed."
type = bool
default = false
}
variable "push" {
description = "If true, then the Image will be pushed to the registry"
type = bool
default = true
}
###########
# Build Variables
###########
variable "dockerfile" {
description = "A directory containing your Dockerfile"
type = string
default = "Dockerfile"
}
variable "context" {
description = "Value to specify the build context. Currently, only a PATH context is supported."
type = string
default = null
}
variable "labels" {
description = "A map of labels to add to the Image"
type = map(string)
default = {}
}
###########
# Build Variables - Triggers
###########
variable "dynamic_build" {
description = "If true, will force the docker_image resource to be replaced. This can be used to rebuild an image when contents of source code folders change."
type = bool
default = true
}
variable "dynamic_build_attach_source" {
description = "If true, will force the docker_image resource to be replaced when contents of source code folders change."
type = bool
default = true
}
variable "dynamic_build_source_dir" {
description = "A directory containing your source code. This variable will be used in dynamic build when var.dynamic_build_attach_source is true."
type = string
default = "src"
}
variable "dynamic_build_attach_dockerfile" {
description = "If true, will force the docker_image resource to be replaced when dockerfile changes."
type = bool
default = true
}
variable "dynamic_build_attach_dockerignore" {
description = "If true, will force the docker_image resource to be replaced when docker ignore file changes."
type = bool
default = true
}
variable "dynamic_build_extra" {
description = "A map of arbitrary strings that, when changed, will force the docker_image resource to be replaced"
type = map(string)
default = null
}