Commit Graph
107 Commits
Author SHA1 Message Date
Wilken Rivera f672f5bd9b command/validate: Add support for HCL2 configuration files
* Update validate command to use FixConfig for checking against known
fixers
* Update validation command flag docs
* Add ConfigFixer method to PackerHandler Interface
* Implement ConfigFixer interface in PackerConfig
* Remove all stdout messaging (i.e calls to c.Ui.Say) in the validate
command. The command will only display hcl.Diagnotic messaging when there is an error or warning.

HCL2 Configs
```
⇶  packer validate docker_centos_shell_provisioner.pkr.hcl

```

JSON Configs
```
⇶  packer validate vmware-iso_ubuntu_minimal/vmware-iso_ubuntu_minimal.json
Error: Failed to prepare build: "vmware-iso"

1 error occurred:
        * Deprecated configuration key: 'iso_checksum_type'. Please call `packer fix`
against your template to update your template to be compatable with the current
version of Packer. Visit https://www.packer.io/docs/commands/fix/ for more
detail.

Warning: Fixable configuration found.
You may need to run `packer fix` to get your build to run correctly.
See debug log for more information.

  map[string]interface{}{
        "builders": []interface{}{
                map[string]interface{}{
                        ... // 3 identical entries
                        "guest_os_type":     string("ubuntu-64"),
                        "http_directory":    string("http"),
-                       "iso_checksum":
string("946a6077af6f5f95a51f82fdc44051c7aa19f9cfc5f737954845a6050543d7c2"),
+                       "iso_checksum":
string("sha256:946a6077af6f5f95a51f82fdc44051c7aa19f9cfc5f737954845a6050543d7c2"),
-                       "iso_checksum_type": string("sha256"),
                        "iso_url":
string("http://old-releases.ubuntu.com/releases/14.04.1/ubuntu-14.04.1-server-amd64.iso"),
                        "shutdown_command":  string("echo 'vagrant' | sudo -S shutdown -P now"),
                        ... // 4 identical entries
                },
        },
  }
```
2020-06-05 14:24:39 -04:00
Adrien Delorme bac9c74447 packer console for HCL2 (#9359) 2020-06-05 17:23:54 +02:00
Wilken Rivera fd0764d668 docs/builder/azure-arm: Add shared_image_gallery to Azure builder options section (#9364) 2020-06-05 11:49:48 +02:00
Megan Marsh 02590f6c44 Merge pull request #9329 from hashicorp/je.website-maintenance-5-29-20
🌷 Website Spring Maintenance
2020-06-03 16:25:23 -07:00
Megan Marsh 19ae0ecf4c Merge pull request #9245 from AdrienneCohea/master
Support named builds in HCL2 templates
2020-06-02 11:42:14 -07:00
jhawk28 c9d0ede67a add http and floppy to vsphere-iso docs. remove references to things … (#9343) 2020-06-02 17:48:11 +02:00
Adrien Delorme 52ba74e3c9 better docs 2020-06-02 16:33:32 +02:00
Adrien Delorme 1147ef9a36 Merge pull request #9291 from hashicorp/f-singular-build-source-blocks
Allow to set source fields from a new `build.source` block
2020-06-02 12:38:45 +02:00
Adrien Delorme 83b3eb3be2 better words on the hcl2 merge 2020-06-02 12:35:32 +02:00
Adrien DelormeandMegan Marsh 80885fd410 Update website/pages/docs/from-1.5/blocks/variable.mdx
Co-authored-by: Megan Marsh <[email protected]>
2020-06-02 12:13:50 +02:00
Adrien Delorme 935ac55d24 more examples for the source block 2020-06-02 12:11:55 +02:00
Adrien Delorme 9a22e85e91 Update source.mdx 2020-06-02 12:01:49 +02:00
Adrien Delorme 171809b033 Update source.mdx 2020-06-02 12:01:21 +02:00
Adrien DelormeandMegan Marsh 3640bd9f01 Update website/pages/docs/from-1.5/blocks/variable.mdx
Co-authored-by: Megan Marsh <[email protected]>
2020-06-02 11:58:01 +02:00
Adrien Delorme 4349a55e61 Explain that input values can be used in locals from example locals block 2020-06-02 11:57:32 +02:00
Sylvia Moss ce45a1990a Refactor communicator config for Qemu and add SkipNatMapping option (#9307) 2020-06-02 11:56:36 +02:00
Adrien Delorme ffcf073007 Update source.mdx
remove double space
2020-06-02 11:53:14 +02:00
Adrien DelormeandMegan Marsh 5c6e4e47d7 Update website/pages/docs/from-1.5/blocks/variable.mdx
Co-authored-by: Megan Marsh <[email protected]>
2020-06-02 11:51:33 +02:00
Adrien DelormeandMegan Marsh 7c3cc995a9 Update website/pages/docs/from-1.5/blocks/source.mdx
Co-authored-by: Megan Marsh <[email protected]>
2020-06-02 11:51:19 +02:00
Adrien DelormeandMegan Marsh 456b0fa0a4 Update website/pages/docs/from-1.5/blocks/source.mdx
Co-authored-by: Megan Marsh <[email protected]>
2020-06-02 11:50:46 +02:00
Adrien DelormeandMegan Marsh f4c393097a Update website/pages/docs/from-1.5/blocks/source.mdx
Co-authored-by: Megan Marsh <[email protected]>
2020-06-02 11:50:28 +02:00
Adrien DelormeandMegan Marsh 5cee17ca5f Update website/pages/docs/from-1.5/blocks/locals.mdx
Co-authored-by: Megan Marsh <[email protected]>
2020-06-02 11:50:17 +02:00
Adrien DelormeandMegan Marsh 279f9365af Update website/pages/docs/from-1.5/blocks/index.mdx
Co-authored-by: Megan Marsh <[email protected]>
2020-06-02 11:50:00 +02:00
Adrien DelormeandMegan Marsh e2090dafd4 Update website/pages/docs/from-1.5/blocks/build/source.mdx
Co-authored-by: Megan Marsh <[email protected]>
2020-06-02 11:49:40 +02:00
Adrien DelormeandMegan Marsh 9ef3020bd5 Update website/pages/docs/from-1.5/blocks/build/index.mdx
Co-authored-by: Megan Marsh <[email protected]>
2020-06-02 11:49:14 +02:00
Conlan 0ca418d656 Fix typo in Ansible Provisioner Docs 2020-06-01 09:53:54 -04:00
Jeff Escalante 700d9e4710 azure chroot partial fixes 2020-05-29 17:17:23 -04:00
Jeff Escalante 66c34f5110 shell snippet fixes, nextjs-scripts upgrades 2020-05-29 17:12:05 -04:00
Adrien Delorme 324367b808 Update variable.mdx 2020-05-28 17:09:57 +02:00
Adrien Delorme 95d37ffc06 add headers 2020-05-28 17:04:34 +02:00