60dc5f39e2
* bumps `actions/checkout` to `v4` * bumps base Packer versions to `1.10` * docs update * package-lock maintenance * updates examples * updates deps * updates example Packer file with new key `bucket_labels` instead of `labels` * adds external plugin for testing * updates copywrite config * install `ncc` globally instead of via `devDeps`
43 lines
835 B
HCL
43 lines
835 B
HCL
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
packer {
|
|
required_plugins {
|
|
# see https://github.com/hashicorp/packer-plugin-hashicups/releases/tag/v1.0.2
|
|
hashicups = {
|
|
version = ">= 1.0.0"
|
|
source = "github.com/hashicorp/hashicups"
|
|
}
|
|
}
|
|
}
|
|
|
|
# file: builds.pkr.hcl
|
|
source "file" "basic_example" {
|
|
content = "Lorem ipsum dolor sit amet"
|
|
target = "sample_artifact"
|
|
}
|
|
|
|
variable "bucket_name" {
|
|
type = string
|
|
default = "hello-world"
|
|
}
|
|
|
|
build {
|
|
hcp_packer_registry {
|
|
bucket_name = "${var.bucket_name}"
|
|
|
|
description = <<EOT
|
|
Some nice description about the image which artifact is being published to HCP Packer Registry. =D
|
|
EOT
|
|
|
|
bucket_labels = {
|
|
"version" = "1.2.3",
|
|
"foo" = "bar",
|
|
}
|
|
}
|
|
|
|
sources = [
|
|
"sources.file.basic_example"
|
|
]
|
|
}
|