Files
Packer-Cn/command
Wilken Rivera f3decafcf8 Add concept of Legacy mode to Packer
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.

```
2022-02-14 11:06:31 -05:00
..
2022-02-14 11:00:41 -05:00
2022-02-14 11:00:41 -05:00
2022-02-14 11:06:31 -05:00
2020-12-17 13:29:25 -08:00
2021-01-20 10:37:16 +01:00
2021-03-25 13:37:48 +01:00
2020-12-17 13:29:25 -08:00
2021-04-19 14:07:22 +02:00
2021-12-01 15:58:33 +01:00
2021-01-20 10:37:16 +01:00
2020-12-17 13:29:25 -08:00
2020-12-17 13:29:25 -08:00
2021-12-01 15:58:33 +01:00
2021-03-12 11:07:26 +01:00
2019-12-17 11:25:56 +01:00
2014-10-27 20:58:44 -07:00