opentofu/website
Alisdair McDiarmid d3284bdc4e
Merge pull request #31220 from FooBartn/string-starts-ends-with-funcs
feat: add startswith and endswith funcs
2022-07-14 13:13:04 -04:00
..
data docs: add documentation for starts and endswith 2022-07-06 10:56:32 -05:00
docs Merge pull request #31220 from FooBartn/string-starts-ends-with-funcs 2022-07-14 13:13:04 -04:00
img/docs feat: pull over content for /docs (#30991) 2022-05-03 16:23:09 -04:00
layouts docs: add documentation for starts and endswith 2022-07-06 10:56:32 -05:00
scripts feat: support local preview, post split; add deploy preview (#30814) 2022-04-21 13:58:16 -04:00
package-lock.json feat: support local preview, post split; add deploy preview (#30814) 2022-04-21 13:58:16 -04:00
package.json feat: support local preview, post split; add deploy preview (#30814) 2022-04-21 13:58:16 -04:00
README.md Merge pull request #31364 from timgates42/bugfix_typos 2022-07-06 17:03:09 -04:00
vercel.json chore: vercel config (#30831) 2022-04-12 12:19:28 -04:00

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.

Modifying Sidebar Navigation

Updates to the sidebar navigation of Terraform docs need to be made in the terraform-website repository (preferably 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

  1. Install Docker.

  2. Create a ~/go directory manually or by installing Go.

  3. Open terminal and set GOPATH as an environment variable:

    Bash: export $GOPATH=~/go(bash)

    Zsh: echo -n 'export GOPATH=~/go' >> ~/.zshrc

  4. Restart your terminal or command line session.

Launch Site Locally

  1. Navigate into your local terraform top-level directory and run make website.
  2. Open http://localhost:3000 in your web browser. While the preview is running, you can edit pages and Next.js will automatically rebuild them.
  3. When you're done with the preview, press ctrl-C in your terminal to stop the server.

Deploy Changes

New commits in hashicorp/terraform do not automatically deploy the site. Do the following for documentation pull requests:

  • Add a backport label to the PR. Use the label that corresponds to the latest Terraform patch release (e.g., 1.2-backport). When you merge your PR to main, GitHub bot automatically generates a backport PR to merge your commits into the appropriate release branch.
  • Merge the backport PR. When all tests pass successfully, merge the backport PR into the release branch. The new content will be added to the site during the next minor release.
  • Cherry-pick changes to stable-website. If you want your changes to show up immediately, check out the latest version of thestable-website branch, cherry-pick your changes to the branch, and run git push. Your changes will be live on the site within the hour.