HashiCorp Cloud Platform
What is HCP Packer?
HCP Packer stores metadata about the artifacts you build using HashiCorp Packer, including when the artifact was created, associated platform, and which Git commit is associated with your build. HCP Packer bridges the gap between artifact creation and deployment by allowing cross-organizational teams to create, manage, and consume artifacts using centralized workflows.
Hands On: Complete the Get Started with HCP Packer collection of tutorials to learn how to set up a Packer template, push metadata to the registry, and explore the registry UI.
How HCP Packer works
HCP Packer stores the metadata associated with the artifacts you build but not the artifact.
The HCP Packer workflow is built around artifact creators and artifact consumers. Creators standardize artifact creation. They perform the following actions:
Connect the HCP Packer registry: Configure the Packer template so that Packer can push the metadata to HCP Packer.
Store artifact metadata: Build the artifact with Packer and push the metadata to HCP Packer.
Manage the metadata: Creators can create channels, revoke artifacts, and perform other management tasks to ensure that consumers use appropriate versions and builds.
Artifact consumers build artifact layers or provision infrastructure by referencing the latest version of artifacts in Packer templates and Terraform configuration files.
The following diagram illustrates the HCP Packer workflow:
HCP Packer benefits
Using HCP Packer to store artifact metadata in a central registry provides several benefits:
Keep track of artifact versions, build new artifacts using the most up-to-date base configuration, and deploy the most up-to-date downstream artifacts.
Clearly designate which artifacts are appropriate for test and production environments and query the correct artifacts for use in both Packer and Terraform configurations.
For example, you can create a
production
channel for artifacts that pass acceptance testing and are ready for production deployment. If an artifact becomes outdated or a security risk, you can revoke it to prevent consumers from using it to build new artifacts. You can revoke access to the artifact itself, and you can also revoke all of its descendant artifacts.Find and reference specific artifacts from a specific builder at a specific point in time. HCP Packer automatically tracks each artifact's source artifact.
View ancestry information in the UI, which warns you when artifacts are outdated.
Tiers
HCP Packer has a Standard tier and a paid Plus tier available. Larger teams will benefit from the Plus tier, which provides advanced artifact compliance checks using the HCP Terraform artifact validation run task, and will continue to add new features that serve more complex organizational requirements and use cases.
Community
Please submit questions, suggestions, and requests to HashiCorp Discuss.
Looking for Packer fundamentals?
Read core Packer documentation and tutorials, including self-hosted docs.
Go to Packer