-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.pkr.hcl
More file actions
59 lines (53 loc) · 1.79 KB
/
variables.pkr.hcl
File metadata and controls
59 lines (53 loc) · 1.79 KB
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
variable "packer_build_name" {
type = string
default = ""
description = "Name of the packer build."
validation {
condition = length(var.packer_build_name) > 0
error_message = "Var 'build_name' has to be set."
}
}
variable "packer_build_version" {
type = string
description = "Version to release the devbox to vagrant cloud with. Has to be semver compatible."
validation {
condition = length(regex("^\\d+\\.\\d+\\.\\d+$", var.packer_build_version)) > 0
error_message = "Var 'packer_build_version' has to be set in the form of 'X.Y.Z', e.g. '0.1.0'."
}
}
variable "ansible_playbook_file" {
type = string
default = ""
description = "Path to the ansible-playbook file to setup the devbox with."
validation {
condition = length(var.ansible_playbook_file) > 0
error_message = "Var 'ansible_playbook_file' has to be set."
}
}
variable "ansible_groups" {
type = list(string)
default = []
description = "List of groups to use when running ansible-playbook."
}
variable "vagrant_source_path" {
type = string
default = ""
description = "URL of the vagrant box to use, e.g. 'bento/ubuntu-24.04'."
validation {
condition = length(var.vagrant_source_path) > 0
error_message = "Var 'vagrant_source_path' has to be set."
}
}
variable "vagrant_skip_add" {
type = bool
default = env("VAGRANT_SKIP_ADD")
description = <<EOF
Set this 'true' to skip 'vagrant box add' before the build starts.
This is useful if 'vagrant_source_path' is already present on your system.
EOF
}
variable "vagrant_cloud_token" {
type = string
default = env("VAGRANT_CLOUD_TOKEN")
description = "Token to authenticate against vagrant cloud API to upload new versions of boxes."
}