Packer 1.12.0 Released

Hello Packer Community,

The Packer Team is excited to announce the official release of Packer 1.12.0. This release contains three major improvements, along with a series of other smaller changes and bug fixes.

Notable changes:

  • Introduction of a Directed Acyclic Graph (DAG) for data source and locals evaluation: in versions prior to 1.12.0, the approach to data source and locals evaluation was sequential, first all the data sources were evaluated, then the locals were. This meant that no data source could reference a local variable, otherwise the evaluation would fail as its dependencies could not be evaluated beforehand. The introduction of this graph-based approach lifts this restriction, so now you will be able to reference a local from a data source, and vice versa.
  • Support uploading Software Bill of Materials (SBOM) to HCP Packer: SBOMs are a standardised way to record data about a software system. For Packer’s case, typically the interesting data is the list of installed software on an image, along with extra information on it like the OS, Architecture, Kernel version, etc. With this feature, you can upload a SBOM to HCP Packer, and have it linked to a build, so you can later consult it or ingest it through external software.
  • Introduce alternate serialisation formats for Packer/plugin communication: prior versions of Packer used gob for serialising data over-the-wire for communication between Packer and its plugins. Since a dependency of ours (go-cty) dropped support for this, we are now moving away from gob, in favour of a combination of both protobuf and msgpack. This is meant to be a transparent change for users, no changes are required to your templates or installed plugins.

In addition to those major changes, we are also introducing new functions to use with HCL:

  • anytrue: check that a collection contains at least one true value.
  • alltrue: check that a collection contains only true values.
  • aws_secretsmanager_raw: get a raw secret from AWS Secrets Manager. Unlike aws_secretsmanager, this works with all types.
  • base64gzip: gzip compress a binary blob and expose it as a base64-encoded string to be used elsewhere in a template.
  • strcontains: checks that a string contains another.

Finally, we are also introducing a few bug fixes:

  • hcl2: fix duplicate error messages on top-level HCL violations
  • build: Include LC_UUID in Darwin binaries, some users were unable to use Packer on recent versions of macOS because of changes on their network policies, so that is fixed with 1.12.0.
  • hcl2: don’t error on empty bucket slug
  • hcp: fix bug when trying to extract HEAD SHA from empty Git repo

As always, you can refer to the Packer CHANGELOG for a more detailed list of changes. We also uploaded release notes and an upgrade guide for this version on our documentation website.

Thank you all again for your continued support and contributions.

The Packer Team.

1 Like