You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/website/content/docs/datasources/hcp/packer-image-iteration.mdx

50 lines
1.9 KiB

---
description: |
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.
page_title: Packer Image Iteration - Data Sources
---
<BadgesHeader>
<PluginBadge type="official" />
<PluginBadge type="hcp_packer_ready" />
</BadgesHeader>
# Packer Image Iteration Data Source
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.
To get started with HCP Packer, refer to the [HCP Packer documentation](https://cloud.hashicorp.com/docs/packer) or try the [Get Started with HCP Packer](https://learn.hashicorp.com/collections/packer/hcp-get-started) collection on HashiCorp Learn.
~> **Note:** You will receive an error if you try to reference metadata from a deactivated or deleted registry. An administrator can manually deactivate or delete a registry, and HCP Packer automatically deactivates registries with billing issues. Contact [HashiCorp Support](https://support.hashicorp.com/) with questions.
## 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.
```hcl
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:
@include 'datasource/packer-image-iteration/Config-required.mdx'
There are currently no optional fields for this datasource, though we intend
to add filtering fields in the future.