github.com/hashicorp/packer@v1.14.3/command/test-fixtures/hcl2_upgrade/error-cleanup-provisioner/expected.pkr.hcl (about) 1 # This file was autogenerated by the 'packer hcl2_upgrade' command. We 2 # recommend double checking that everything is correct before going forward. We 3 # also recommend treating this file as disposable. The HCL2 blocks in this 4 # file can be moved to other files. For example, the variable blocks could be 5 # moved to their own 'variables.pkr.hcl' file, etc. Those files need to be 6 # suffixed with '.pkr.hcl' to be visible to Packer. To use multiple files at 7 # once they also need to be in the same folder. 'packer inspect folder/' 8 # will describe to you what is in that folder. 9 10 # Avoid mixing go templating calls ( for example ```{{ upper(`string`) }}``` ) 11 # and HCL2 calls (for example '${ var.string_value_example }' ). They won't be 12 # executed together and the outcome will be unknown. 13 14 # source blocks are generated from your builders; a source can be referenced in 15 # build blocks. A build block runs provisioner and post-processors on a 16 # source. Read the documentation for source blocks here: 17 # https://www.packer.io/docs/templates/hcl_templates/blocks/source 18 source "null" "autogenerated_1" { 19 communicator = "none" 20 } 21 22 # a build block invokes sources and runs provisioning steps on them. The 23 # documentation for build blocks can be found here: 24 # https://www.packer.io/docs/templates/hcl_templates/blocks/build 25 build { 26 sources = ["source.null.autogenerated_1"] 27 28 provisioner "shell-local" { 29 inline = ["exit 2"] 30 } 31 32 error-cleanup-provisioner "shell-local" { 33 inline = ["echo 'rubber ducky'> ducky.txt"] 34 } 35 36 }