.. | ||
docs | ||
guides | ||
intro | ||
layouts | ||
upgrade-guides | ||
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.
Suggesting Changes
You can submit an issue with documentation requests or submit a pull request with suggested changes.
Click Edit this page at the bottom of any Terraform website page to go directly to the associated markdown file in GitHub.
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. If terraform-website
isn't in your GOPATH
, the preview command will clone it to your machine.
Set Up Local Environment
-
Create a
~/go
directory manually or by installing Go. -
Open terminal and set
GOPATH
as an environment variable:Bash:
export $GOPATH=~/go
(bash)Zsh:
echo -n 'export GOPATH=~/go' >> ~/.zshrc
-
Restart your terminal or command line session.
Launch Site Locally
- Navigate into your local
terraform
top-level directory and runmake website
. - Open
http://localhost:3000
in your web browser. While the preview is running, you can edit pages and the site will automatically re-build 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.0
) 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 (details 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.
Backport Tags
Instead of cherry-picking your commits to a specific version branch, you can add the associated backport tag (e.g., "1.1-backport") to your pull request before merging. After you merge, a bot automatically creates a pull request to add your commits to the version branch (linked in your original PR). You must manually merge the auto-generated PR into the version branch.
Deployment
Our website is redeployed automatically when a user in the HashiCorp GitHub organization merges changes in the terraform-website
repository.
New commits in this repository don't automatically deploy the terraform.io site, but an unrelated site deploy will usually happen within a day. If you can't wait that long, you can ask someone in the #proj-terraform-docs channel to do so.