terraform/website
Alisdair McDiarmid f5b90f84a8 jsonconfig: Improve provider configuration output
When rendering configuration as JSON, we have a single map of provider
configurations at the top level, since these are globally applicable.
Each resource has an opaque key into this map which points at the
configuration data for the provider.

This commit fixes two bugs in this implementation:

- Resources in non-root modules had an invalid provider config key,
  which meant that there was never a valid reference to the provider
  config block. These keys were prefixed with the local module name
  instead of the path to the module. This is now corrected.

- Modules with passed provider configs would point to either an empty
  provider config block or one which is not present at all. This has
  been fixed so that these resources point to the provider config block
  from the calling module (or wherever up the module tree it was
  originally defined).

We also add a "full_name" key-value pair to the provider config block,
with the entire fully-qualified provider name including hostname and
namespace.
2022-02-07 15:05:58 -05:00
..
data Merge pull request #30399 from hashicorp/add-new-intro-docs 2022-01-26 17:57:50 -05:00
docs jsonconfig: Improve provider configuration output 2022-02-07 15:05:58 -05:00
guides migrate docs to mdx 2021-12-14 18:41:17 -08:00
intro Fixing some final typos and nits that robin found! 2022-01-26 20:06:49 -05:00
layouts Oops edited the wrong layout file 2022-01-18 14:07:40 -08:00
README.md update make website workflow 2021-12-16 16:10:17 -08:00

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

  1. Install Docker.
  2. 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.

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 resets stable-website to match the release tag, removing any additional commits. So, we recommend always cherry-picking to the version branch first and then to stable-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.