Skip to content

Commit

Permalink
add packer.io docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sylviamoss committed Jul 28, 2021
1 parent 83fbd8e commit c5090d7
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
description: >
The hcp_packer_registry allows operators the ability to customize the metadata sent to HCP Packer Registry.
It configures the base details needed for creating or updating an image within HCP PAR.
page_title: hcp_packer_registry - build - Blocks
---

# The `hcp_packer_registry` block

The `hcp_packer_registry` block nested in a build block, allows operators the ability to customize the metadata sent to
HCP Packer Registry. It configures the base details needed for creating or updating an image within HCP PAR.

The presence of a `hcp_packer_registry` block will enable HCP PAR mode, and all the source builds within that build block
will be pushed to the remote registry as far the appropriate HCP credentials are set (`HCP_CLIENT_ID` and `HCP_CLIENT_SECRET`).

```hcl
# file: builds.pkr.hcl
source "file" "basic-example" {
content = "Lorem ipsum dolor sit amet"
target = "sample_artifact"
}
build {
name = "example-artifact"
hcp_packer_registry {
description = <<EOT
Some nice description about the image which artifact is being published to HCP Packer Registry. =D
EOT
labels = {
"foo-version" = "3.4.0",
"foo" = "bar",
}
}
sources = ["sources.file.basic-example"]
}
```
4 changes: 4 additions & 0 deletions website/data/docs-nav-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
"title": "Overview",
"path": "templates/hcl_templates/blocks/build"
},
{
"title": "<code>hcp_packer_registry</code>",
"path": "templates/hcl_templates/blocks/build/hcp_packer_registry"
},
{
"title": "<code>source</code>",
"path": "templates/hcl_templates/blocks/build/source"
Expand Down

0 comments on commit c5090d7

Please sign in to comment.