NOTES:
Packer user documentation has been moved to the new HashiCorp developer documentation portal. The main Packer site (
https://www.packer.io) will continue to be the home for Packer but all requests for general documentation and binary downloads will be redirected to
https://developer.hashicorp.com/packer. Users are encouraged to visit the developer documentation portal for access to all Packer related documentation; including integrations with HCP Packer.
The Oracle builder and post-processor are no longer vendored with Packer core. Users of the Oracle plugin should use packer init to install the latest version of the plugin. See the Oracle Plugin Documentation for more information. GH-11983
HCP Packer environment variables: The behavior of some HCP Packer-specific environment variables have changed slightly. Refer to HCP Packer in the Packer documentation for a full list of HCP Packer environment variables. GH-12059
For JSON templates, the HCP_PACKER_REGISTRY environment variable was previously required to enable the HCP Packer integration. In this release, the environment variable is now optional, and can be used for disabling the publishing of metadata for any HCP Packer enabled configuration template.
For HCL2 templates, the HCP_PACKER_REGISTRY environment variable can be used to disable publishing to a HCP Packer registry even if the template defines a hcp_packer_registry block. This can be useful for testing that a template works as intended prior to pushing metadata to HCP Packer.
The HCP_PACKER_BUCKET_NAME environment variable is now the only requirement to push metadata to a HCP Packer registry, in both JSON and HCL2 templates without a hcp_packer_registry block.
FEATURES:
Provisioner/powershell: Add use_pwsh configuration argument to support pwsh in powershell provisioner. GH-11950
PLUGINS:
Builder/oracle: Remove Oracle plugin from the list of vendored plugins. GH-11983
IMPROVEMENTS:
Command/hcl2_upgrade: Has been updated to persist all possible template engine options that were supported by the legacy JSON templates. While the upgrade command copies the template engine options as is support for the template options may not actually work with HCL2 templates; indicated by an error similar to fieldname type <no value> is invalid. Before executing a build with the upgraded template you are encouraged to run packer validate against the template and fix any invalid <no value> references. GH-12068
Core/hcl2: Packer will now report an error when executing a build with no sources selected for execution. GH-12016
Core/hcp: Configuration errors for HCP Packer enabled builds have been consolidated into a single report to help users address all potential issues before retrying their build. GH-12031
Core/hcp: Named builds within a legacy JSON template are now published to a HCP Packer registry using its full build name (e.g happycloud.windows-srv-2019), as opposed to just the build name field (e.g "name"="windows-srv-2019"). Builders with no defined name will continue to publish build metadate using the builder type as the build name (e.g happycloud). GH-12059
Core:hcl2: When a variable is set in a variables definitions file (i.e *.pkrvars.hcl), but isn't defined with the template files (i.e *.pkr.hcl), the outputted error message will now include an example of variable block that can be added to the build template to remedy the issue. GH-12020
Core: Add ppc64le to binary releases for Linux. GH-11966
Core: Bump github.com/hashicorp/packer-plugin-sdk from 0.3.1 to 0.3.2. GH-11981
Core: Bump supported Go version to 1.18. GH-11927
BUG FIXES:
Command/hcl2_upgrade: special case: Azure shared_image_gallery fix. GH-12087
Core: Bump golang.org/x/sys to address CVE-2022-29526. GH-11953
Core: Bump golang.org/x/text to v0.3.8. GH-12047
Core: Update dependency to resolve GO-2022-0969. GH-12009