2019-10-15 06:47:59 -04:00
|
|
|
|
|
|
|
// starts resources to provision them.
|
|
|
|
build {
|
2019-12-17 05:25:56 -05:00
|
|
|
sources = [
|
|
|
|
"source.virtualbox-iso.ubuntu-1204",
|
|
|
|
]
|
2019-10-15 06:47:59 -04:00
|
|
|
|
2020-05-25 11:09:37 -04:00
|
|
|
source "source.amazon-ebs.ubuntu-1604" {
|
|
|
|
string = "setting from build section"
|
|
|
|
}
|
|
|
|
|
2019-12-17 05:25:56 -05:00
|
|
|
provisioner "shell" {
|
2020-01-16 06:08:39 -05:00
|
|
|
name = "provisioner that does something"
|
2020-07-02 12:02:19 -04:00
|
|
|
not_squashed = "${var.foo} ${upper(build.ID)}"
|
2019-12-17 05:25:56 -05:00
|
|
|
string = "string"
|
Hcl2 input variables, local variables and functions (#8588)
Mainly redefine or reused what Terraform did.
* allow to used `variables`, `variable` and `local` blocks
* import the following functions and their docs from Terraform: abs, abspath, basename, base64decode, base64encode, bcrypt, can, ceil, chomp, chunklist, cidrhost, cidrnetmask, cidrsubnet, cidrsubnets, coalesce, coalescelist, compact, concat, contains, convert, csvdecode, dirname, distinct, element, file, fileexists, fileset, flatten, floor, format, formatdate, formatlist, indent, index, join, jsondecode, jsonencode, keys, length, log, lookup, lower, max, md5, merge, min, parseint, pathexpand, pow, range, reverse, rsadecrypt, setintersection, setproduct, setunion, sha1, sha256, sha512, signum, slice, sort, split, strrev, substr, timestamp, timeadd, title, trim, trimprefix, trimspace, trimsuffix, try, upper, urlencode, uuidv4, uuidv5, values, yamldecode, yamlencode, zipmap.
2020-02-06 05:49:21 -05:00
|
|
|
int = "${41 + 1}"
|
|
|
|
int64 = "${42 + 1}"
|
|
|
|
bool = "true"
|
2019-12-17 05:25:56 -05:00
|
|
|
trilean = true
|
Hcl2 input variables, local variables and functions (#8588)
Mainly redefine or reused what Terraform did.
* allow to used `variables`, `variable` and `local` blocks
* import the following functions and their docs from Terraform: abs, abspath, basename, base64decode, base64encode, bcrypt, can, ceil, chomp, chunklist, cidrhost, cidrnetmask, cidrsubnet, cidrsubnets, coalesce, coalescelist, compact, concat, contains, convert, csvdecode, dirname, distinct, element, file, fileexists, fileset, flatten, floor, format, formatdate, formatlist, indent, index, join, jsondecode, jsonencode, keys, length, log, lookup, lower, max, md5, merge, min, parseint, pathexpand, pow, range, reverse, rsadecrypt, setintersection, setproduct, setunion, sha1, sha256, sha512, signum, slice, sort, split, strrev, substr, timestamp, timeadd, title, trim, trimprefix, trimspace, trimsuffix, try, upper, urlencode, uuidv4, uuidv5, values, yamldecode, yamlencode, zipmap.
2020-02-06 05:49:21 -05:00
|
|
|
duration = "${9 + 1}s"
|
2020-04-14 10:05:13 -04:00
|
|
|
map_string_string = {
|
2019-12-17 05:25:56 -05:00
|
|
|
a = "b"
|
|
|
|
c = "d"
|
2019-10-15 06:47:59 -04:00
|
|
|
}
|
2020-02-20 04:51:34 -05:00
|
|
|
slice_string = [for s in var.availability_zone_names : lower(s)]
|
2020-02-03 11:03:28 -05:00
|
|
|
slice_slice_string = [
|
|
|
|
["a","b"],
|
|
|
|
["c","d"]
|
|
|
|
]
|
2019-10-15 06:47:59 -04:00
|
|
|
|
2019-12-17 05:25:56 -05:00
|
|
|
nested {
|
|
|
|
string = "string"
|
|
|
|
int = 42
|
|
|
|
int64 = 43
|
|
|
|
bool = true
|
|
|
|
trilean = true
|
|
|
|
duration = "10s"
|
2020-04-14 10:05:13 -04:00
|
|
|
map_string_string = {
|
2019-12-17 05:25:56 -05:00
|
|
|
a = "b"
|
|
|
|
c = "d"
|
|
|
|
}
|
2020-02-20 04:51:34 -05:00
|
|
|
slice_string = [for s in var.availability_zone_names : lower(s)]
|
2020-02-03 11:03:28 -05:00
|
|
|
slice_slice_string = [
|
|
|
|
["a","b"],
|
|
|
|
["c","d"]
|
|
|
|
]
|
2019-10-15 06:47:59 -04:00
|
|
|
}
|
|
|
|
|
2019-12-17 05:25:56 -05:00
|
|
|
nested_slice {
|
2020-02-20 04:51:34 -05:00
|
|
|
tag {
|
|
|
|
key = "first_tag_key"
|
|
|
|
value = "first_tag_value"
|
|
|
|
}
|
|
|
|
dynamic "tag" {
|
|
|
|
for_each = local.standard_tags
|
|
|
|
content {
|
|
|
|
key = tag.key
|
|
|
|
value = tag.value
|
|
|
|
}
|
|
|
|
}
|
2019-10-15 06:47:59 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-17 05:25:56 -05:00
|
|
|
provisioner "file" {
|
2020-07-02 12:02:19 -04:00
|
|
|
not_squashed = "${var.foo} ${upper(build.ID)}"
|
2019-12-17 05:25:56 -05:00
|
|
|
string = "string"
|
|
|
|
int = 42
|
|
|
|
int64 = 43
|
|
|
|
bool = true
|
|
|
|
trilean = true
|
|
|
|
duration = "10s"
|
2020-04-14 10:05:13 -04:00
|
|
|
map_string_string = {
|
2019-12-17 05:25:56 -05:00
|
|
|
a = "b"
|
|
|
|
c = "d"
|
2019-10-15 06:47:59 -04:00
|
|
|
}
|
2020-02-20 04:51:34 -05:00
|
|
|
slice_string = local.abc_map[*].id
|
2020-02-03 11:03:28 -05:00
|
|
|
slice_slice_string = [
|
|
|
|
["a","b"],
|
|
|
|
["c","d"]
|
|
|
|
]
|
2019-10-15 06:47:59 -04:00
|
|
|
|
2019-12-17 05:25:56 -05:00
|
|
|
nested {
|
|
|
|
string = "string"
|
|
|
|
int = 42
|
|
|
|
int64 = 43
|
|
|
|
bool = true
|
|
|
|
trilean = true
|
|
|
|
duration = "10s"
|
2020-04-14 10:05:13 -04:00
|
|
|
map_string_string = {
|
2020-01-16 06:08:39 -05:00
|
|
|
a = "b"
|
|
|
|
c = "d"
|
|
|
|
}
|
|
|
|
slice_string = [
|
|
|
|
"a",
|
|
|
|
"b",
|
|
|
|
"c",
|
|
|
|
]
|
2020-02-03 11:03:28 -05:00
|
|
|
slice_slice_string = [
|
|
|
|
["a","b"],
|
|
|
|
["c","d"]
|
|
|
|
]
|
2020-01-16 06:08:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
nested_slice {
|
2020-02-20 04:51:34 -05:00
|
|
|
tag {
|
|
|
|
key = "first_tag_key"
|
|
|
|
value = "first_tag_value"
|
|
|
|
}
|
|
|
|
dynamic "tag" {
|
|
|
|
for_each = local.standard_tags
|
|
|
|
content {
|
|
|
|
key = tag.key
|
|
|
|
value = tag.value
|
|
|
|
}
|
|
|
|
}
|
2020-01-16 06:08:39 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-25 03:36:48 -04:00
|
|
|
post-processor "amazon-import" {
|
2020-01-16 06:08:39 -05:00
|
|
|
name = "something"
|
|
|
|
string = "string"
|
|
|
|
int = 42
|
|
|
|
int64 = 43
|
|
|
|
bool = true
|
|
|
|
trilean = true
|
|
|
|
duration = "10s"
|
2020-06-25 03:36:48 -04:00
|
|
|
keep_input_artifact = true
|
2020-04-14 10:05:13 -04:00
|
|
|
map_string_string = {
|
2020-01-16 06:08:39 -05:00
|
|
|
a = "b"
|
|
|
|
c = "d"
|
|
|
|
}
|
|
|
|
slice_string = [
|
|
|
|
"a",
|
|
|
|
"b",
|
|
|
|
"c",
|
|
|
|
]
|
2020-02-03 11:03:28 -05:00
|
|
|
slice_slice_string = [
|
|
|
|
["a","b"],
|
|
|
|
["c","d"]
|
|
|
|
]
|
2020-01-16 06:08:39 -05:00
|
|
|
|
|
|
|
nested {
|
|
|
|
string = "string"
|
|
|
|
int = 42
|
|
|
|
int64 = 43
|
|
|
|
bool = true
|
|
|
|
trilean = true
|
|
|
|
duration = "10s"
|
2020-04-14 10:05:13 -04:00
|
|
|
map_string_string = {
|
2019-12-17 05:25:56 -05:00
|
|
|
a = "b"
|
|
|
|
c = "d"
|
|
|
|
}
|
|
|
|
slice_string = [
|
|
|
|
"a",
|
|
|
|
"b",
|
|
|
|
"c",
|
|
|
|
]
|
2020-02-03 11:03:28 -05:00
|
|
|
slice_slice_string = [
|
|
|
|
["a","b"],
|
|
|
|
["c","d"]
|
|
|
|
]
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
nested_slice {
|
|
|
|
}
|
2019-10-15 06:47:59 -04:00
|
|
|
}
|
|
|
|
|
2020-06-25 03:36:48 -04:00
|
|
|
post-processor "amazon-import" {
|
2019-12-17 05:25:56 -05:00
|
|
|
string = "string"
|
|
|
|
int = 42
|
|
|
|
int64 = 43
|
|
|
|
bool = true
|
|
|
|
trilean = true
|
|
|
|
duration = "10s"
|
2020-04-14 10:05:13 -04:00
|
|
|
map_string_string = {
|
2019-12-17 05:25:56 -05:00
|
|
|
a = "b"
|
|
|
|
c = "d"
|
|
|
|
}
|
|
|
|
slice_string = [
|
|
|
|
"a",
|
|
|
|
"b",
|
|
|
|
"c",
|
|
|
|
]
|
2020-02-03 11:03:28 -05:00
|
|
|
slice_slice_string = [
|
|
|
|
["a","b"],
|
|
|
|
["c","d"]
|
|
|
|
]
|
2019-10-15 06:47:59 -04:00
|
|
|
|
2019-12-17 05:25:56 -05:00
|
|
|
nested {
|
|
|
|
string = "string"
|
|
|
|
int = 42
|
|
|
|
int64 = 43
|
|
|
|
bool = true
|
|
|
|
trilean = true
|
|
|
|
duration = "10s"
|
2020-04-14 10:05:13 -04:00
|
|
|
map_string_string = {
|
2019-12-17 05:25:56 -05:00
|
|
|
a = "b"
|
|
|
|
c = "d"
|
|
|
|
}
|
|
|
|
slice_string = [
|
|
|
|
"a",
|
|
|
|
"b",
|
|
|
|
"c",
|
2019-10-15 06:47:59 -04:00
|
|
|
]
|
2020-02-03 11:03:28 -05:00
|
|
|
slice_slice_string = [
|
|
|
|
["a","b"],
|
|
|
|
["c","d"]
|
|
|
|
]
|
2019-10-15 06:47:59 -04:00
|
|
|
}
|
2019-12-17 05:25:56 -05:00
|
|
|
|
|
|
|
nested_slice {
|
|
|
|
}
|
2019-10-15 06:47:59 -04:00
|
|
|
}
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|