mirror of
https://github.com/hashicorp/packer.git
synced 2026-02-24 02:10:31 -05:00
* mapstructure-to-hcl2: when we see a map generate an attribute spec and not a block spec
this will alow to do
tags = {
key = "value"
}
instead of
tags {
key = "value"
}
This will also enable using variables directly for those tags
* generate code
* update tests
149 lines
3 KiB
HCL
149 lines
3 KiB
HCL
|
|
// starts resources to provision them.
|
|
build {
|
|
sources = [
|
|
"source.amazon-ebs.ubuntu-1604",
|
|
"source.virtualbox-iso.ubuntu-1204",
|
|
]
|
|
|
|
provisioner "shell" {
|
|
string = "string"
|
|
int = "${41 + 1}"
|
|
int64 = "${42 + 1}"
|
|
bool = "true"
|
|
trilean = true
|
|
duration = "${9 + 1}s"
|
|
map_string_string = {
|
|
a = "b"
|
|
c = "d"
|
|
}
|
|
slice_string = [
|
|
"a",
|
|
"b",
|
|
"c",
|
|
]
|
|
slice_slice_string = [
|
|
["a","b"],
|
|
["c","d"]
|
|
]
|
|
|
|
nested {
|
|
string = "string"
|
|
int = 42
|
|
int64 = 43
|
|
bool = true
|
|
trilean = true
|
|
duration = "10s"
|
|
map_string_string = {
|
|
a = "b"
|
|
c = "d"
|
|
}
|
|
slice_string = [
|
|
"a",
|
|
"b",
|
|
"c",
|
|
]
|
|
slice_slice_string = [
|
|
["a","b"],
|
|
["c","d"]
|
|
]
|
|
}
|
|
|
|
nested_slice {
|
|
}
|
|
}
|
|
|
|
provisioner "file" {
|
|
string = "string"
|
|
int = 42
|
|
int64 = 43
|
|
bool = true
|
|
trilean = true
|
|
duration = "10s"
|
|
map_string_string = {
|
|
a = "b"
|
|
c = "d"
|
|
}
|
|
slice_string = [
|
|
"a",
|
|
"b",
|
|
"c",
|
|
]
|
|
slice_slice_string = [
|
|
["a","b"],
|
|
["c","d"]
|
|
]
|
|
|
|
nested {
|
|
string = "string"
|
|
int = 42
|
|
int64 = 43
|
|
bool = true
|
|
trilean = true
|
|
duration = "10s"
|
|
map_string_string = {
|
|
a = "b"
|
|
c = "d"
|
|
}
|
|
slice_string = [
|
|
"a",
|
|
"b",
|
|
"c",
|
|
]
|
|
slice_slice_string = [
|
|
["a","b"],
|
|
["c","d"]
|
|
]
|
|
}
|
|
|
|
nested_slice {
|
|
}
|
|
}
|
|
|
|
post-processor "amazon-import" {
|
|
string = "string"
|
|
int = 42
|
|
int64 = 43
|
|
bool = true
|
|
trilean = true
|
|
duration = "10s"
|
|
map_string_string = {
|
|
a = "b"
|
|
c = "d"
|
|
}
|
|
slice_string = [
|
|
"a",
|
|
"b",
|
|
"c",
|
|
]
|
|
slice_slice_string = [
|
|
["a","b"],
|
|
["c","d"]
|
|
]
|
|
|
|
nested {
|
|
string = "string"
|
|
int = 42
|
|
int64 = 43
|
|
bool = true
|
|
trilean = true
|
|
duration = "10s"
|
|
map_string_string = {
|
|
a = "b"
|
|
c = "d"
|
|
}
|
|
slice_string = [
|
|
"a",
|
|
"b",
|
|
"c",
|
|
]
|
|
slice_slice_string = [
|
|
["a","b"],
|
|
["c","d"]
|
|
]
|
|
}
|
|
|
|
nested_slice {
|
|
}
|
|
}
|
|
}
|