Packer
Packer Image Iteration Data Source
Official
HCP Packer Ready
Type: packer-image-iteration
The Packer Image Iteration Data Source retrieves information about an
iteration from the HCP Packer registry. This information can be parsed to
provide a source image to various Packer builders.
Note: HCP Packer is under active development, and we are currently offering a public beta version to collect feedback and continue improving the product. To get started, visit the HCP Packer documentation or try the Get Started with HCP Packer collection on HashiCorp Learn.
Basic Example
Below is a fully functioning example. It stores information about an image iteration, which can then be parsed and accessed using HCL tools.
data "packer-image-iteration" "hardened-source" {
bucket = "hardened-ubuntu-16-04"
channel = "production-stable"
}
Configuration Reference
Configuration options are organized below into two categories: required and optional. Within each category, the available options are alphabetized and described.
Required:
bucket_name(string) - The name of the bucket your image is in.channel(string) - The name of the channel to use when retrieving your image
There are currently no optional fields for this datasource, though we intend to add filtering fields in the future.