packer-cn/hcl2template/testdata/build/post-processor_onlyexcept.pkr.hcl
Adrien Delorme 3d371a2d5d
Add complete HCL2 examples + allow to name a singular build.source blocks (#9490)
* in the examples/hcl folder
* add possibility to name singular build.source blocks to differentiate their output and to filter on them
2020-07-02 11:07:59 +02:00

30 lines
637 B
HCL

// starts resources to provision them.
build {
sources = [
"source.virtualbox-iso.ubuntu-1204",
]
source "source.amazon-ebs.ubuntu-1604" {
name = "aws-ubuntu-16.04"
}
post-processor "amazon-import" {
only = ["virtualbox-iso.ubuntu-1204"]
}
post-processor "manifest" {
except = ["virtualbox-iso.ubuntu-1204"]
}
post-processor "amazon-import" {
only = ["amazon-ebs.aws-ubuntu-16.04"]
}
post-processor "manifest" {
except = ["amazon-ebs.aws-ubuntu-16.04"]
}
}
source "virtualbox-iso" "ubuntu-1204" {
}
source "amazon-ebs" "ubuntu-1604" {
}