23395a1022
Previously we would only ever add new lock entries or update existing ones. However, it's possible that over time a module may _cease_ using a particular provider, at which point we ought to remove it from the lock file so that operations won't fail when seeing that the provider cache directory is inconsistent with the lock file. Now the provider installer (EnsureProviderVersions) will remove any lock file entries that relate to providers not included in the given requirements, which therefore makes the resulting lock file properly match the set of packages the installer wrote into the cache. This does potentially mean that someone could inadvertently defeat the lock by removing a provider dependency, running "terraform init", then undoing that removal, and finally running "terraform init" again. However, that seems relatively unlikely compared to the likelihood of removing a provider and keeping it removed, and in the event it _did_ happen the changes to the lock entry for that provider would be visible in the diff of the provider lock file as usual, and so could be noticed in code review just as for any other change to dependencies. |
||
---|---|---|
.. | ||
docs | ||
guides | ||
intro | ||
layouts | ||
README.md |
README.md
Terraform Documentation
This directory contains the portions of the Terraform website that pertain to the core functionality, excluding providers and the overall configuration.
The files in this directory are intended to be used in conjunction with
the terraform-website
repository, which brings all of the
different documentation sources together and contains the scripts for testing and building the site as
a whole.
Modifying Sidebar Navigation
Updates to the sidebar navigation of Terraform docs need to be made in the terraform-website
repository (preferrably in a PR also updating the submodule commit). You can read more about how to make modifications to the navigation in the README for terraform-website
.
Previewing Changes
You should preview all of your changes locally before creating a pull request. The build includes content from this repository and the terraform-website
repository, allowing you to preview the entire Terraform documentation site.
Set Up Local Environment
- Install Docker.
- Restart your terminal or command line session.
Launch Site Locally
- Navigate into your local
terraform
top-level directory and runmake website
. - Open
http://localhost:4567
in your web browser. While the preview is running, you can edit pages and Next.js will automatically rebuild them. - When you're done with the preview, press
ctrl-C
in your terminal to stop the server.
Deploying Changes
Merge the PR to main. The changes will appear in the next major Terraform release.
If you need your changes to be deployed sooner, cherry-pick them to:
- the current release branch (e.g.
v1.1
) and push. They will be deployed in the next minor version release (once every two weeks). - the
stable-website
branch and push. They will be included in the next site deploy (see below). Note that the release process resetsstable-website
to match the release tag, removing any additional commits. So, we recommend always cherry-picking to the version branch first and then tostable-website
when needed.
Once your PR to stable-website
is merged, open a PR bumping the submodule commit in terraform-website
.
Deployment
New commits in hashicorp/terraform
and hashicorp/terraform-cdk
don't automatically deploy the site. To use the latest upstream content, you'll need to open a PR bumping the submodule commit. If your changes aren't being deployed, it's very likely that you need to open a PR to update the submodule commit.