In the legacy mode users running build or validate with JSON templates will get a
warning indicating that Packer is in Legacy Configuration Mode.
Legacy mode can be controlled by a environment variable.
PACKER_LEGACY_MODE=auto // default if not set will display warnings to the user.
PACKER_LEGACY_MODE=off // will display warnings to the user when running, and may disable other features.
PACKER_LEGACY_MODE=on // will not display warnings with all legacy features enabled.
```
~> go run . validate ../packer-templates/amazon-chroot/amazon-chroot_shell.json
Legacy JSON Configuration Mode enabled.
The template will be parsed in the legacy configuration style. Legacy style
templates will continue to work but users are encouraged to move HCL style templates.
templates will continue to work but users are encouraged to move to HCL style templates.
See: https://learn.hashicorp.com/tutorials/packer/hcl2-upgrade
The configuration is valid.
~> PACKER_LEGACY_MODE=on go run . validate ../packer-templates/amazon-chroot/amazon-chroot_shell.json
The configuration is valid.
```
* evaluateLocalVariables: modify code for readability and some (not benchmarked) perfs
* Make default input variable type the DynamicPseudoType
This should be the default, and avoids a panic. This type can represent situations where a type is not yet known. Its meaning is undefined in cty.
* do not take Empty types from default value
* Update types.variables.go
Co-authored-by: Wilken Rivera <[email protected]>
The auto installation of external plugins via packer init only work for
HCL templates. Since we have not officially removed all plugins (slated
for 1.8.0) I am reverting this test change. Once 1.7.9 is released we
can begin removing plugins and optimizing the redirect experience for
JSON-only users.
* Add variable interpolation support to hcp_packer_registry block
* Add tests for variable interpolation in hcp_packer_registry block
* Add variable interpolation support to the build block (#11425)
* Add simple test to build command
* add test for crash
* fix
* show more precise error message when parse of a provisioner fails
* Revert "fix"
This reverts commit fc88e89fbb.
* add better severity
This change temporarily renames the type of the packer-image-iteration
datasource to prevent it from being automatically registered by the
Packer plugin tooling. The datasource is fully functional, but not quite
ready for full usage. It will be updated in a future release.
* Update handling of registry artifacts
This change uses the github.com/hashicorp/packer-plgin-sdk/packer/registryimage for querying
Artifact State for HCP Registry Image metadata. To handle the conversion
of the RPC response, mapstructure was introduced to conversion state
data into an registryimage.Image before publishing to a image bucket.
* Update to use registry image from packersdk
* Rename internal registry service pkg
* Update vendored plugins to latest version
* The latest release of Amazon, GoogleCompute, and Azure have support
for publishing images to the HCP Packer registry.