website/commands/init: Add blurb on plugin selection

This change adds text around how plugin selection for plugins defined in
a require_plugins block work. It also adds a small call out to users
that third party plugins are not verified by HashiCorp.
This commit is contained in:
Wilken Rivera 2021-02-09 12:13:26 -05:00
parent ffbb110167
commit 9986834a62

View File

@ -8,10 +8,10 @@ sidebar_title: <tt>init</tt>
# `init` Command
-> **Note:** Packer init does not work with legacy JSON templates. You can
upgrade your JSON config files to HCL using the hcl2ugprade command.
upgrade your JSON config files to HCL using the [hcl2_upgrade](/docs/commands/hcl2_upgrade) command.
-> **Note:** Packer init will only work with multiplugins -- that is plugins
that are named `packer-plugin-*` -- to install a single plugin binary -- that is
that are named `packer-plugin-*`. To install a single plugin binary -- that is
`packer-provisioner-*`, `packer-builder-*`, etc. -- nothing changes, you will
have to [install the plugin manually](/docs/plugins#installing-plugins).
@ -53,6 +53,13 @@ packer {
}
```
HashiCorp does not officially verify third party Packer plugins, plugins not under the HashiCorp namespace `hashicorp/*`; as with all open source tools, please do your own due diligence when using a new tool.
## Plugin Selection
Plugin selection depends on the source and version constraints defined within the `required_plugins` block.
For each of the required plugins Packer will query the source repository `azr/myawesomecloud` whose fully qualified address
is `https://github.com/azr/packer-plugin-myawesomecloud` for a plugin matching the version constraints for the host Os.
Packer init will install the latest found version matching the version selection
in the `required_plugins` section. Make sure to set a correct [version
constraint
@ -60,9 +67,11 @@ string](/docs/templates/hcl_templates/blocks/packer#version-constraints). The
plugins will be installed in the [Plugin
Directory](/docs/configure#packer-s-plugin-directory).
See [Installing Plugins](/docs/plugins#installing-plugins) for more information on how plugin installation works.
## Options
- `-upgrade` - On top of installing missing plugins, update installed plugins to
the latest available version, if there is a new higher one. Note that this
still takes into consideration the version constraint of the config.