Hi @ChristoWolf / @steven,
I’ll try to clarify as much as possible sure, let me know if there’s something we need to re-explain.
Please note that the docs are not yet completely updated in preparation for 1.11.0, so right now the docs we have on https://developer.hashicorp.com/ are still for v1.10.x and will change when 1.11.0 is out the door.
There are preview docs available for 1.11.0, but even at that, we are working on updating them before the release happens.
Copying plugin binaries to $PACKER_CONFIG_DIR/plugins
will not work as-is anymore starting with 1.11.0, and instead we do advise you use packer plugins install --path
to install your plugins, if you cannot use packer init
for this.
packer init
is the simplest method, with the main drawback being that the source has to be github.com
in order for it to be able to install the plugins. We plan to address this limitation in an upcoming release, please bear with us for now. Being coupled with required_plugins
in the template, this also has the merits of documenting the requirements, and pointing to a URI where one can find the binaries.
Now to be fair you could still install plugins the hard way, by moving them into the plugins directory, under a filesystem hierarchy that matches the source defined for the plugin, with a naming convention that Packer requires (already the case for required_plugins
), and an accompanying sumfile. Please note though that while technically possible, we don’t support this explicitly and this will be undocumented as an installation method.
If you want to understand this and play with it, feel free to take a look at the implementation for packer plugins install --path
, as this is essentially what you will need to manually replicate.
If only to make sure you are comfortable before that hits GA, I would suggest you try out the beta we released almost two weeks ago.
To answer @steven’s comment:
“packer plugins install /?” results in a message:
“Invalid plugin source string; The ‘source’ attribute must be in the format ‘hosname/namespace/name’”, which implied that plugins install only work on online installations.
This happens because the help function for packer commands is --help
, anything that isn’t following this convention is considered an argument to the command, and /?
is indeed an invalid source for fetching a plugin from.
Hope this helps clarify your questions, feel free to update this thread again if you need more help.