The HCL2 docs on built-in functions contains a link to a non-existent
section of the expressions page, so we update it to link to the general
page, and to the string interpolation section, since it is a common use
case.
Since this feature is no longer something we plan to activate later, as
it contradicts with our efforts to remove bundled plugins, and
encouraging users to move to either manually installing plugins, or
managing them through `packer init', we clean-up the code for this
feature.
Since we added support for PLSPs recently, and it will be released as part of 1.9.3, we add some documentation regarding the environment variables we added, and a note regarding their relation to PLSP support.
The `packer init' command's wording was not clear, so it was changed in
a preceding commit, and this commit aims to add more details on how the
command is meant to be used, along with a simple example.
When the config file header was reworked, an erroneous link was
included and placed so close to the header that it was rendered verbatim
in the final documentation page.
By adding an extra empty line in between the anchor link and the header,
this renders correctly.
Packer checks a number of directories for plugins upon initialization,
with the introduction of multi-component plugins and underlying changes
to the Packer SDK the ordering changed slightly. These changes update
the related documentation to reflect the new ordering, and adds a plugin
loading ordering section to the docs to help users discover how plugin
loading works.
Include in this change are updates to the PACKER_CONFIG_DIR environment
variables to reflect the XDG base directory specification used as the
default Packer configuration directory layout.
* Update website/content/docs/configure.mdx
* docs: add a paragraph on fingerprint generation
Since version 1.9.0+ changed the way Packer generates fingerprints for
HCP Packer, we add a small paragraph to explain how it used to be
generated before, and how it changed in this version.
* Apply suggestions from code review
---------
Co-authored-by: Wilken Rivera <wilken@hashicorp.com>
With HCP supporting multi-projects now, Packer needs to take it into
account when picking a project from an organisation.
This commit adds two cases:
1. multiple projects are defined, none is supplied through
HCP_PROJECT_ID: in this case we will default to the oldest project
defined for the organisation.
2. we supply HCP_PROJECT_ID: in this case, we pick the project with the
corresponding ID, and use it for publishing metadata.
* clarify local and input variables
* Apply suggestions from code review
Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>
Co-authored-by: Wilken Rivera <wilken@hashicorp.com>
* Apply suggestions from code review
Co-authored-by: Wilken Rivera <wilken@hashicorp.com>
---------
Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>
Co-authored-by: Wilken Rivera <wilken@hashicorp.com>
Fingerprints are how we link a packer build to an iteration on HCP.
These are computed automatically from the Git SHA in the current state,
and are unique to the bucket/iteration.
The main problem with this approach is that while sound in theory, it
quickly falls apart when users want to run the same build configuration
twice, but expect a new image to be created.
With the current model, this fails, as the iteration with the current
SHA already exists.
While this is solvable through environment variables, or by committing a
change to the repository, we think this is not clear enough, and causes
an extra step to what should otherwise be a simple process.
Therefore, to lower the barrier of entry into HCP, we change this
behaviour with this commit.
Now, fingerprints are randomly generated ULIDs instead of a git SHA, and
a new one is always generated, unless one is already specified in the
environment.
This makes continuation of an existing iteration a conscious choice
rather than something automatic, and virtually eliminates conflicts such
as the ones described above.
In trying the example, I found that you have to type "*.second-example" for the expected results. I took the command line on line #78 literal and it didn't work as typed. When I used my proposed change... it worked for me.
Alternatively, "*.second*" works but that could grab builders that were not intended.
The `packer-image-iteration' datasource is an undocumented, and
unexported datasource, so it cannot be used by clients.
Since this is dead weight, we can remove it safely from the codebase.
When the options for bypassing/enabling assigned and undeclared
variables were added to Packer, the website documentation for those
commands and options was not updated.
This commit adds some documentation for those options.
When packer validate is invoked, it does not try to evaluate the
datasources before attempting to decide if the template is valid.
In many cases, this works, but sometimes it will fail as the value is
unknown by the validation code.
Since the validation code for all the elements of a Packer template is
left to be implemented by plugins, we cannot rely on checking for
unknown values everywhere, especially since the unknown references are
replaced automatically by a value of the right type for the
configuration expected.
So, in order for such configurations to be validable, we add an extra
option to packer validate, that will let users evaluate the datasources
from a template.
* Add documentation for configuring Packer for HCP Packer
This change works to document the two configuration options for setting
up Packer to publish build artifacts to an active HCP Packer registry.
Currently the HashiCorp Cloud Platform documents the process for
configuring Packer via a HCL template, which is the preferred route.
This documentation focuses more on the use of environment variables for
configuring Packer for HCP Packer, which is necessary for legacy JSON
template users looking to publish to HCP Packer.
In light of the new HCP Packer documentation page we've opted for a shorter
version of the HCP Packer introduction section.
* Applying the first round of suggestions to tighten up the documentation.
* Move HCP Packer side bar to top
* Move intro into docs
* Add redirects for intro pages
Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
* website: fix broken links on /docs/templates
* fix: redirected install-plugins link
* fix: debugging link
* fix: secrets manager link in docs
* fix: secrets manager link in source
* fix: amazon ami plugin link in docs
* fix: amazon ami plugin link in source
* fix: extending plugins link
* fix: plugins/builders/amazon links
* fix: various builders links
* fix: various amazon builder links
* fix: redirected terminology link
* fix: custom-provisioners link
* fix: docker-push redirected plugin link
* fix: googlecompute plugin links
* fix: hyperv iso plugin links
* website: update link to hcl upgrade guide
Co-authored-by: Wilken Rivera <wilken@hashicorp.com>
Co-authored-by: Wilken Rivera <wilken@hashicorp.com>
With the move to Hashidocs, the version picker is within the text area
for the documentation being displayed. This negatively interacts with
the Note on top, as it obstructs part of the text.
To circumvent this problem, we move the Note after the title/intro.
* Separate install instructions; add to external plugins
* Remove duplicate external plugin link; modify overiew page
* Remove unnecessary partials; clean up plugin overview page
* cleaning up plugin explanations
* final language updates
* modify external plugin overview page
* Update website/content/docs/plugins/index.mdx
Co-authored-by: Wilken Rivera <wilken@hashicorp.com>
* Update website/content/docs/plugins/install-plugins.mdx
Co-authored-by: Wilken Rivera <wilken@hashicorp.com>
* Move HCP Support to under developing plugins
* Link HCP Packer support to other dev pages; fix overviews
* clean up more language and links
* Add External Plugins link to docs sidebar under plugin section
* Update website/data/docs-nav-data.json
Co-authored-by: Wilken Rivera <wilken@hashicorp.com>