mirror of
https://github.com/hashicorp/packer.git
synced 2026-02-23 18:04:11 -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
88 lines
No EOL
1.7 KiB
HCL
88 lines
No EOL
1.7 KiB
HCL
// a source represents a reusable setting for a system boot/start.
|
|
source "virtualbox-iso" "ubuntu-1204" {
|
|
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 {
|
|
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 {
|
|
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"]
|
|
]
|
|
}
|
|
} |