28 lines
674 B
Plaintext
28 lines
674 B
Plaintext
```hcl
|
|
# build.pkr.hcl
|
|
build {
|
|
|
|
sources = [
|
|
# use the plural `sources` block to simply use sources
|
|
# without changing any field.
|
|
"source.amazon-ebs.example",
|
|
]
|
|
|
|
source "source.amazon-ebs.example" {
|
|
# Use the singular `source` block set
|
|
# specific fields.
|
|
# Note that fields cannot be overwritten, in other words, you cannot
|
|
# set output from the top-level source block and here.
|
|
output = "different value"
|
|
name = var.foo
|
|
}
|
|
|
|
provisioner "shell-local" {
|
|
inline = ["echo Hello World"]
|
|
}
|
|
|
|
post-processor "shell-local" {
|
|
inline = ["echo Hello World"]
|
|
}
|
|
}
|
|
``` |