How to Set Up a Golden Image Pipeline with HCP Packer and Terraform

Updating images across cloud infrastructure is often a tedious and manual task. Packer now makes this easier with HCL2, and can now be used with HCP Packer to build and update golden images in automation.

By codifying versions of images as golden images, you will be able to:

  • Define golden images using channels

    Choose a preferred iteration of an image for testing and production.

  • Configure downstream images

    By referencing these channel IDs across downstream images, they can be updated automatically when a new build is triggered.

  • Integrate with Terraform

    Using the HCP Provider for Terraform, the Packer data source allows you to codify images in your Terraform configuration files rather than hard-coding them.