Added eslint + remark-lint to our documentation pages ()

Signed-off-by: James Humphries <james@james-humphries.co.uk>
This commit is contained in:
James Humphries 2023-09-06 17:16:54 +01:00 committed by GitHub
parent 0941afc75a
commit acc913a77e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 7074 additions and 27470 deletions

11
website/.eslintrc.js Normal file
View File

@ -0,0 +1,11 @@
module.exports = {
"extends": ["plugin:mdx/recommended"],
// optional, if you want to lint code blocks at the same time
"settings": {
"mdx/code-blocks": true,
// optional, if you want to disable language mapper, set it to `false`
// if you want to override the default language mapper inside, you can provide your own
"mdx/language-mapper": {},
"mdx/remark": {}
}
}

View File

@ -1,55 +0,0 @@
.DEFAULT_GOAL := website
# Set the preview mode for the website shell to "developer" or "io"
PREVIEW_MODE ?= developer
REPO ?= opentf
# Enable setting alternate docker tool, e.g. 'make DOCKER_CMD=podman'
DOCKER_CMD ?= docker
CURRENT_GIT_BRANCH=$$(git rev-parse --abbrev-ref HEAD)
LOCAL_CONTENT_DIR=../docs
PWD=$$(pwd)
DOCKER_IMAGE="hashicorp/dev-portal"
DOCKER_IMAGE_LOCAL="dev-portal-local"
DOCKER_RUN_FLAGS=-it \
--publish "3000:3000" \
--rm \
--tty \
--volume "$(PWD)/docs:/app/docs" \
--volume "$(PWD)/img:/app/public" \
--volume "$(PWD)/data:/app/data" \
--volume "$(PWD)/redirects.js:/app/redirects.js" \
--volume "next-dir:/app/website-preview/.next" \
--volume "$(PWD)/.env:/app/.env" \
--volume "$(PWD)/.env.development:/app/website-preview/.env.development" \
--volume "$(PWD)/.env.local:/app/website-preview/.env.local" \
-e "REPO=$(REPO)" \
-e "PREVIEW_FROM_REPO=$(REPO)" \
-e "IS_CONTENT_PREVIEW=true" \
-e "LOCAL_CONTENT_DIR=$(LOCAL_CONTENT_DIR)" \
-e "CURRENT_GIT_BRANCH=$(CURRENT_GIT_BRANCH)" \
-e "PREVIEW_MODE=$(PREVIEW_MODE)"
# Default: run this if working on the website locally to run in watch mode.
.PHONY: website
website:
@echo "==> Downloading latest Docker image..."
@$(DOCKER_CMD) pull $(DOCKER_IMAGE)
@echo "==> Starting website..."
@$(DOCKER_CMD) run $(DOCKER_RUN_FLAGS) $(DOCKER_IMAGE)
# Use this if you have run `website/build-local` to use the locally built image.
.PHONY: website/local
website/local:
@echo "==> Starting website from local image..."
@$(DOCKER_CMD) run $(DOCKER_RUN_FLAGS) $(DOCKER_IMAGE_LOCAL)
# Run this to generate a new local Docker image.
.PHONY: website/build-local
website/build-local:
@echo "==> Building local Docker image"
@$(DOCKER_CMD) build https://github.com/hashicorp/dev-portal.git\#main \
-t $(DOCKER_IMAGE_LOCAL)

View File

@ -20,7 +20,7 @@ If the validation fails, actionable error messages will be displayed to help you
## Modifying Sidebar Navigation
You must update the the sidebar navigation when you add or delete documentation .mdx files. If you do not update the navigation, the website deploy preview fails.
You must update the sidebar navigation when you add or delete documentation .mdx files. If you do not update the navigation, the website deploy preview fails.
To update the sidebar navigation, you must edit the appropriate `nav-data.json` file. This repository contains the sidebar navigation files for the following documentation sets:
@ -30,46 +30,8 @@ To update the sidebar navigation, you must edit the appropriate `nav-data.json`
## Previewing Changes
You should preview all of your changes locally before creating a pull request.
**Set Up Local Environment**
1. [Install Docker](https://docs.docker.com/get-docker/).
2. [Install Go](https://golang.org/doc/install) or create a `~/go` directory manually.
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 `opentf` top-level directory and run `make website`.
1. Open `http://localhost:3000` in your web browser. While the preview is running, you can edit pages and Next.js automatically rebuilds them.
1. Press `ctrl-C` in your terminal to stop the server and end the preview.
Coming soon: Documenting the development process for the documentation website repo.
## Deploying Changes
Merging a PR to `main` queues up documentation changes for the next minor product release. Your changes are not immediately available on the website.
The website generates versioned documentation by pointing to the HEAD of the release branch for that version. For example, the `v1.2.x` documentation on the website points to the HEAD of the `v1.2` release branch in the `opentf` repository. To update existing documentation versions, you must also backport your changes to that release branch. Backported changes become live on the site within one hour.
### Backporting
**Important:** Editing old versions (not latest) should be rare. We backport to old versions when there is an egregious error. Egregious errors include inaccuracies that could cause security vulnerabilities or extreme inconvenience for users.
Backporting involves cherry-picking commits to one or more release branches within a docs repository. You can backport (cherry-pick) commits to a version branch by adding the associated backport label to your pull request. For example, if you need to add a security warning to the v1.1 documentation, you must add the `1.1-backport` label. When you merge a pull request with one or more backport labels, GitHub Actions opens a backport PR to cherry-pick your changes to the associated release branches. You must manually merge the backport PR to finish backporting the changes.
To make your changes available on the latest docs version:
1. Add the backport label for the latest version.
<img width="317" alt="Screen Shot 2022-08-09 at 11 06 17 AM" src="https://user-images.githubusercontent.com/83350965/183686586-f94e58f3-fd62-48cf-88bd-fa886fe4724f.png">
1. Merge the pull request. GitHub Actions autogenerates a backport pull request, linked to the original.
1. Merge the auto-generated backport pull request.
You can review and merge your own backport pull request without waiting for another review if the changes in the backport pull request are effectively equivalent to the original. You can make minor adjustments to resolve merge conflicts, but you should not merge a backport PR that contains major content or functionality changes from the original, approved pull request. If you are not sure whether it is okay to merge a backport pull request, post a comment on the original pull request to discuss with the team.
Coming soon: Documenting the deployment process for the documentation website repo.

View File

@ -39,7 +39,7 @@ decisions.
Without a saved plan file, `opentf apply` supports all planning modes and planning options available for `opentf plan`.
- **[Planning Modes](/opentf/cli/commands/plan#planning-modes):** These include `-destroy`, which creates a plan to destroy all remote objects, and `-refresh-only`, which creates a plan to update OpenTF state and root module output values.
- **[Planning Modes](/opentf/cli/commands/plan#planning-modes):** These include `-destroy`, which creates a plan to destroy all remote objects, and `-refresh-only`, which creates a plan to update OpenTF state and root module output values.
- **[Planning Options](/opentf/cli/commands/plan#planning-options):** These include specifying which resource instances OpenTF should replace, setting OpenTF input variables, etc.
### Apply Options

View File

@ -5,7 +5,7 @@ description: >-
Registry.
---
<!-- THIS PAGED IS LINKED TO IN THE CLI -->
{/* THIS PAGED IS LINKED TO IN THE CLI */}
# Plugin Signing

View File

@ -35,7 +35,7 @@ You can use any data source from any provider as a scoped data source within a `
A `check` block can optionally contain a nested (a.k.a. scoped) data source. This `data` block behaves like an external [data source](/opentf/language/data-sources), except you can not reference it outside its enclosing `check` block. Additionally, if a scoped data source's provider raises any errors, they are masked as warnings and do not prevent OpenTF from continuing operation execution.
You can use a scoped data source to validate the status of a piece of infrastructure outside of the usual OpenTF resource lifecycle. [In the above example](#checks-syntax), if the `placeholderplaceholderplaceholder_io` data source fails to load, you receive a warning instead of a blocking error, which would occur if you declared this data source outside of a `check` block.
You can use a scoped data source to validate the status of a piece of infrastructure outside of the usual OpenTF resource lifecycle. [In the above example](#syntax), if the `placeholderplaceholderplaceholder_io` data source fails to load, you receive a warning instead of a blocking error, which would occur if you declared this data source outside of a `check` block.
#### Meta-Arguments
@ -45,7 +45,7 @@ Scoped data sources support the `depends_on` and `provider` [meta-arguments](/op
The `depends_on` meta-argument can be particularly powerful when used within scoped data sources.
The first time OpenTF creates the _initial_ plan for our [previous example](#checks-syntax), the plan fails because OpenTF has not applied its configuration yet. Meaning this test fails because OpenTF must still create the resources to make this website exist. Therefore, the first time OpenTF runs this check, it always throws a potentially distracting error message.
The first time OpenTF creates the _initial_ plan for our [previous example](#syntax), the plan fails because OpenTF has not applied its configuration yet. Meaning this test fails because OpenTF must still create the resources to make this website exist. Therefore, the first time OpenTF runs this check, it always throws a potentially distracting error message.
You can fix this by adding [`depends_on`](/opentf/language/meta-arguments/depends_on) to your scoped data source, ensuring it depends on an essential piece of your site's infrastructure, such as the load balancer. The check returns `known after apply` until that crucial piece of your website is ready. This strategy avoids producing unnecessary warnings during setup, and the check executes during subsequent plans and applies.
@ -93,7 +93,7 @@ Preconditions are unique amongst the custom conditions in that they execute _bef
You can often use postconditions interchangeably with check blocks to validate resources and data sources.
For example, you can [rewrite the above `check` block example](#checks-syntax) to use a postcondition instead. The below code uses a `postcondition` block to validate that the website returns the expected status code of `200`.
For example, you can [rewrite the above `check` block example](#syntax) to use a postcondition instead. The below code uses a `postcondition` block to validate that the website returns the expected status code of `200`.
```hcl
data "http" "placeholderplaceholderplaceholder_io" {

View File

@ -9,11 +9,11 @@ description: >-
You can create conditions that produce custom error messages for several types of objects in a configuration. For example, you can add a condition to an input variable that checks whether incoming image IDs are formatted properly. Custom conditions can capture assumptions, helping future maintainers understand the configuration design and intent. They also return useful information about errors earlier and in context, helping consumers more easily diagnose issues in their configurations.
This page explains the following:
- Creating checks with [assertions](#checks-with-assertions) to verify your infrastructure as a whole
- Creating [validation conditions](#input-variable-validation) for input variables
- Creating [preconditions and postconditions](#preconditions-and-postconditions) for resources, data sources, and outputs
- Writing effective [condition expressions](#condition-expressions) and [error messages](#error-messages)
- When OpenTF [evaluates custom conditions](#conditions-checked-only-during-apply) during the plan and apply cycle
- Creating checks with [assertions](#checks-with-assertions) to verify your infrastructure as a whole
- Creating [validation conditions](#input-variable-validation) for input variables
- Creating [preconditions and postconditions](#preconditions-and-postconditions) for resources, data sources, and outputs
- Writing effective [condition expressions](#condition-expressions) and [error messages](#error-messages)
- When OpenTF [evaluates custom conditions](#conditions-checked-only-during-apply) during the plan and apply cycle
## Selecting a Custom Condition for your use case

View File

@ -90,7 +90,7 @@ The three kinds of collection type in the OpenTF language are:
the full form.
Maps can be made with braces ({}) and colons (:) or equals signs (=):
{ "foo": "bar", "bar": "baz" } OR { foo = "bar", bar = "baz" }. Quotes
\{ "foo": "bar", "bar": "baz" } OR \{ foo = "bar", bar = "baz" }. Quotes
may be omitted on keys, unless the key starts with a number, in which
case quotes are required. Commas are required between key/value pairs
for single line maps. A newline between key/value pairs is sufficient

View File

@ -101,8 +101,6 @@ parentheses, like `(var.business_unit_tag_name) = "SRE"`.
## Indices and Attributes
[inpage-index]: #indices-and-attributes
Elements of list/tuple and map/object values can be accessed using
the square-bracket index notation, like `local.list[3]`. The expression within
the brackets must be a whole number for list and tuple values or a string

View File

@ -22,4 +22,4 @@ true
```
> strcontains("hello world", "wod")
false
```
```

View File

@ -33,9 +33,9 @@ resource "aws_instance" "example" {
The above `import` block defines an import of the AWS instance with the ID "i-abcd1234" into the `aws_instance.example` resource in the root module.
The `import` block has the following arguments:
- `to` - The instance address this resource will have in your state file.
- `id` - A string with the [import ID](#import-id) of the resource.
- `provider` (optional) - An optional custom resource provider, see [The Resource provider Meta-Argument](/opentf/language/meta-arguments/resource-provider) for details.
- `to` - The instance address this resource will have in your state file.
- `id` - A string with the [import ID](#import-id) of the resource.
- `provider` (optional) - An optional custom resource provider, see [The Resource provider Meta-Argument](/opentf/language/meta-arguments/resource-provider) for details.
If you do not set the `provider` argument, OpenTF attempts to import from the default provider.

View File

@ -6,8 +6,6 @@ description: >-
# Providers Within Modules
[inpage-providers]: #providers-within-modules
In a configuration with multiple modules, there are some special considerations
for how resources are associated with provider configurations.

View File

@ -183,6 +183,8 @@ from their parents.
<a id="provider-versions"></a>
## `version` (Deprecated)
{/* TODO: Figure out the best way to link to this, or remove the deprecated setting documentation completely */}
{/* lint ignore remark-lint-no-undefined-references */}
[inpage-versions]: #provider-versions

View File

@ -62,7 +62,7 @@ The following arguments are supported:
is destroyed. Refer to [Destroy-Time Provisioners](/opentf/language/resources/provisioners/syntax#destroy-time-provisioners)
for details.
* `quiet` - (Optional) If set to `true`, OpenTF will not print the command to be executed to stdout, and will instead print "Suppressed by quiet=true". Note that the output of the command will still be printed in any case.
* `quiet` - (Optional) If set to `true`, OpenTF will not print the command to be executed to stdout, and will instead print "Suppressed by quiet=true". Note that the output of the command will still be printed in any case.
### Interpreter Examples

View File

@ -70,6 +70,6 @@ The following configuration options / environment variables are supported:
For mTLS authentication, the following three options may be set:
- `client_certificate_pem` / `TF_HTTP_CLIENT_CERTIFICATE_PEM` - (Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication.
- `client_private_key_pem` /`TF_HTTP_CLIENT_PRIVATE_KEY_PEM` - (Optional) A PEM-encoded private key, required if client_certificate_pem is specified.
- `client_ca_certificate_pem` / `TF_HTTP_CLIENT_CA_CERTIFICATE_PEM` - (Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.
- `client_certificate_pem` / `TF_HTTP_CLIENT_CERTIFICATE_PEM` - (Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication.
- `client_private_key_pem` /`TF_HTTP_CLIENT_PRIVATE_KEY_PEM` - (Optional) A PEM-encoded private key, required if client_certificate_pem is specified.
- `client_ca_certificate_pem` / `TF_HTTP_CLIENT_CA_CERTIFICATE_PEM` - (Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.

View File

@ -62,8 +62,6 @@ the expected versions for each provider you use.
## Specifying Provider Requirements
[inpage-source]: #specifying-provider-requirements
The `required_providers` block specifies all of the providers required by the
current module, mapping each local provider name to a source address and a
version constraint.

View File

@ -7,8 +7,6 @@ description: >-
# The `terraform_remote_state` Data Source
[backends]: /opentf/language/settings/backends/configuration
The `terraform_remote_state` data source uses the latest state snapshot from a specified state backend to retrieve the root module output values
from some other OpenTF configuration.

View File

@ -300,8 +300,6 @@ configuration file. This can be useful to note which program created the file.
## Block-type-specific Exceptions
[inpage-block]: #block-type-specific-exceptions
Certain arguments within specific block types are processed in a special way
by OpenTF, and so their mapping to the JSON syntax does not follow the
general rules described above. The following sub-sections describe the special

View File

@ -1,584 +0,0 @@
<% wrap_layout :inner do %>
<% content_for :sidebar do %>
<h4><a href="/docs/cli/index.html">OpenTF CLI</a></h4>
<ul class="nav docs-sidenav">
<li>
<a href="/docs/cli/index.html">Overview</a>
</li>
<li>
<a href="/docs/cli/commands/index.html">Basic CLI Features</a>
</li>
<li>
<a href="#">Initializing Working Directories</a>
<ul class="nav">
<li>
<a href="/docs/cli/init/index.html">Overview</a>
</li>
<li>
<a href="/docs/cli/commands/init.html"><code>init</code></a>
</li>
<li>
<a href="/docs/cli/commands/get.html"><code>get</code></a>
</li>
</ul>
</li>
<li>
<a href="#">Provisioning Infrastructure</a>
<ul class="nav">
<li>
<a href="/docs/cli/run/index.html">Overview</a>
</li>
<li>
<a href="/docs/cli/commands/plan.html"><code>plan</code></a>
</li>
<li>
<a href="/docs/cli/commands/apply.html"><code>apply</code></a>
</li>
<li>
<a href="/docs/cli/commands/destroy.html"><code>destroy</code></a>
</li>
</ul>
</li>
<li>
<a href="#">Authenticating</a>
<ul class="nav">
<li>
<a href="/docs/cli/auth/index.html">Overview</a>
</li>
<li>
<a href="/docs/cli/commands/login.html"><code>login</code></a>
</li>
<li>
<a href="/docs/cli/commands/logout.html"><code>logout</code></a>
</li>
</ul>
</li>
<li>
<a href="#">Writing and Modifying Code</a>
<ul class="nav">
<li>
<a href="/docs/cli/code/index.html">Overview</a>
</li>
<li>
<a href="/docs/cli/commands/console.html"><code>console</code></a>
</li>
<li>
<a href="/docs/cli/commands/fmt.html"><code>fmt</code></a>
</li>
<li>
<a href="/docs/cli/commands/validate.html"><code>validate</code></a>
</li>
<li>
<a href="/docs/cli/commands/0.13upgrade.html"><code>0.13upgrade</code></a>
</li>
<li>
<a href="/docs/cli/commands/0.12upgrade.html"><code>0.12upgrade</code></a>
</li>
</ul>
</li>
<li>
<a href="#">Inspecting Infrastructure</a>
<ul class="nav">
<li>
<a href="/docs/cli/inspect/index.html">Overview</a>
</li>
<li>
<a href="/docs/cli/commands/graph.html"><code>graph</code></a>
</li>
<li>
<a href="/docs/cli/commands/output.html"><code>output</code></a>
</li>
<li>
<a href="/docs/cli/commands/show.html"><code>show</code></a>
</li>
<li>
<a href="/docs/cli/commands/state/list.html"><code>state list</code></a>
</li>
<li>
<a href="/docs/cli/commands/state/show.html"><code>state show</code></a>
</li>
</ul>
</li>
<li>
<a href="#">Importing Infrastructure</a>
<ul class="nav">
<li>
<a href="/docs/cli/import/index.html">Overview</a>
</li>
<li>
<a href="/docs/cli/commands/import.html"><code>import</code></a>
</li>
<li>
<a href="/docs/cli/import/usage.html">Usage Tips</a>
</li>
<li>
<a href="/docs/cli/import/importability.html">Resource Importability</a>
</li>
</ul>
</li>
<li>
<a href="#">Manipulating State</a>
<ul class="nav">
<li>
<a href="/docs/cli/state/index.html">Overview</a>
</li>
<li>
<a href="/docs/cli/state/resource-addressing.html">Resource Addressing</a>
</li>
<li>
<a href="/docs/cli/commands/state/index.html"><code>state</code></a>
</li>
<li>
<a href="#">Inspecting State</a>
<ul class="nav nav-auto-expand">
<li>
<a href="/docs/cli/state/inspect.html">Overview</a>
</li>
<li>
<a href="/docs/cli/commands/state/list.html"><code>state list</code></a>
</li>
<li>
<a href="/docs/cli/commands/state/show.html"><code>state show</code></a>
</li>
<li>
<a href="/docs/cli/commands/refresh.html"><code>refresh</code></a>
</li>
</ul>
</li>
<li>
<a href="#">Forcing Re-creation (Tainting)</a>
<ul class="nav nav-auto-expand">
<li>
<a href="/docs/cli/state/taint.html">Overview</a>
</li>
<li>
<a href="/docs/cli/commands/taint.html"><code>taint</code></a>
</li>
<li>
<a href="/docs/cli/commands/untaint.html"><code>untaint</code></a>
</li>
</ul>
</li>
<li>
<a href="#">Moving Resources</a>
<ul class="nav nav-auto-expand">
<li>
<a href="/docs/cli/state/move.html">Overview</a>
</li>
<li>
<a href="/docs/cli/commands/state/mv.html"><code>state mv</code></a>
</li>
<li>
<a href="/docs/cli/commands/state/rm.html"><code>state rm</code></a>
</li>
<li>
<a href="/docs/cli/commands/state/replace-provider.html"><code>state replace-provider</code></a>
</li>
</ul>
</li>
<li>
<a href="#">Disaster Recovery</a>
<ul class="nav nav-auto-expand">
<li>
<a href="/docs/cli/state/recover.html">Overview</a>
</li>
<li>
<a href="/docs/cli/commands/state/pull.html"><code>state pull</code></a>
</li>
<li>
<a href="/docs/cli/commands/state/push.html"><code>state push</code></a>
</li>
<li>
<a href="/docs/cli/commands/force-unlock.html"><code>force-unlock</code></a>
</li>
</ul>
</li>
</ul>
</li> <!-- state -->
<li>
<a href="#">Managing Workspaces</a>
<ul class="nav">
<li>
<a href="/docs/cli/workspaces/index.html">Overview</a>
</li>
<li>
<a href="#"><code>workspace</code></a>
<ul class="nav nav-auto-expand">
<li>
<a href="/docs/cli/commands/workspace/index.html">Overview</a>
</li>
<li>
<a href="/docs/cli/commands/workspace/list.html"><code>workspace list</code></a>
</li>
<li>
<a href="/docs/cli/commands/workspace/select.html"><code>workspace select</code></a>
</li>
<li>
<a href="/docs/cli/commands/workspace/new.html"><code>workspace new</code></a>
</li>
<li>
<a href="/docs/cli/commands/workspace/delete.html"><code>workspace delete</code></a>
</li>
<li>
<a href="/docs/cli/commands/workspace/show.html"><code>workspace show</code></a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#">Managing Plugins</a>
<ul class="nav">
<li>
<a href="/docs/cli/plugins/index.html">Overview</a>
</li>
<li>
<a href="/docs/cli/plugins/signing.html">Plugin Signing</a>
</li>
<li>
<a href="/docs/cli/commands/providers.html"><code>providers</code></a>
</li>
<li>
<a href="/docs/cli/commands/version.html"><code>version</code></a>
</li>
<li>
<a href="/docs/cli/commands/providers/lock.html"><code>providers lock</code></a>
</li>
<li>
<a href="/docs/cli/commands/providers/mirror.html"><code>providers mirror</code></a>
</li>
<li>
<a href="/docs/cli/commands/providers/schema.html"><code>providers schema</code></a>
</li>
</ul>
</li>
<li>
<a href="#">CLI Configuration</a>
<ul class="nav">
<li>
<a href="/docs/cli/config/index.html">Overview</a>
</li>
<li>
<a href="/docs/cli/config/config-file.html">CLI Config File</a>
</li>
<li>
<a href="/docs/cli/config/environment-variables.html">Environment Variables</a>
</li>
</ul>
</li>
<li>
<a href="#">Using Cloud Backends</a>
<ul class="nav">
<li>
<a href="/docs/cli/cloud/index.html">Overview</a>
</li>
<li>
<a href="/docs/cli/cloud/settings.html">Cloud Backend Settings</a>
</li>
<li>
<a href="/docs/cli/cloud/migrating.html">Initializing and Migrating</a>
</li>
<li>
<a href="/docs/cli/cloud/command-line-arguments.html">Command Line Arguments</a>
</li>
</ul>
</li>
<li>
<a href="#">Alphabetical List of Commands</a>
<ul class="nav">
<li>
<a href="/docs/cli/commands/apply.html"><code>apply</code></a>
</li>
<li>
<a href="/docs/cli/commands/console.html"><code>console</code></a>
</li>
<li>
<a href="/docs/cli/commands/destroy.html"><code>destroy</code></a>
</li>
<li>
<a href="/docs/cli/commands/env.html"><code>env</code></a>
</li>
<li>
<a href="/docs/cli/commands/fmt.html"><code>fmt</code></a>
</li>
<li>
<a href="/docs/cli/commands/force-unlock.html"><code>force-unlock</code></a>
</li>
<li>
<a href="/docs/cli/commands/get.html"><code>get</code></a>
</li>
<li>
<a href="/docs/cli/commands/graph.html"><code>graph</code></a>
</li>
<li>
<a href="/docs/cli/commands/import.html"><code>import</code></a>
</li>
<li>
<a href="/docs/cli/commands/init.html"><code>init</code></a>
</li>
<li>
<a href="/docs/cli/commands/login.html"><code>login</code></a>
</li>
<li>
<a href="/docs/cli/commands/logout.html"><code>logout</code></a>
</li>
<li>
<a href="/docs/cli/commands/output.html"><code>output</code></a>
</li>
<li>
<a href="/docs/cli/commands/plan.html"><code>plan</code></a>
</li>
<li>
<a href="/docs/cli/commands/providers.html"><code>providers</code></a>
</li>
<li>
<a href="/docs/cli/commands/providers/lock.html"><code>providers lock</code></a>
</li>
<li>
<a href="/docs/cli/commands/providers/mirror.html"><code>providers mirror</code></a>
</li>
<li>
<a href="/docs/cli/commands/providers/schema.html"><code>providers schema</code></a>
</li>
<li>
<a href="/docs/cli/commands/push.html"><code>push</code></a>
</li>
<li>
<a href="/docs/cli/commands/refresh.html"><code>refresh</code></a>
</li>
<li>
<a href="/docs/cli/commands/show.html"><code>show</code></a>
</li>
<li>
<a href="/docs/cli/commands/state/list.html"><code>state list</code></a>
</li>
<li>
<a href="/docs/cli/commands/state/mv.html"><code>state mv</code></a>
</li>
<li>
<a href="/docs/cli/commands/state/pull.html"><code>state pull</code></a>
</li>
<li>
<a href="/docs/cli/commands/state/push.html"><code>state push</code></a>
</li>
<li>
<a href="/docs/cli/commands/state/replace-provider.html"><code>state replace-provider</code></a>
</li>
<li>
<a href="/docs/cli/commands/state/rm.html"><code>state rm</code></a>
</li>
<li>
<a href="/docs/cli/commands/state/show.html"><code>state show</code></a>
</li>
<li>
<a href="/docs/cli/commands/taint.html"><code>taint</code></a>
</li>
<li>
<a href="/docs/cli/commands/test.html"><code>test</code></a>
</li>
<li>
<a href="/docs/cli/commands/untaint.html"><code>untaint</code></a>
</li>
<li>
<a href="/docs/cli/commands/validate.html"><code>validate</code></a>
</li>
<li>
<a href="/docs/cli/commands/version.html"><code>version</code></a>
</li>
<li>
<a href="/docs/cli/commands/workspace/list.html"><code>workspace list</code></a>
</li>
<li>
<a href="/docs/cli/commands/workspace/select.html"><code>workspace select</code></a>
</li>
<li>
<a href="/docs/cli/commands/workspace/new.html"><code>workspace new</code></a>
</li>
<li>
<a href="/docs/cli/commands/workspace/delete.html"><code>workspace delete</code></a>
</li>
<li>
<a href="/docs/cli/commands/workspace/show.html"><code>workspace show</code></a>
</li>
<li>
<a href="/docs/cli/commands/0.12upgrade.html"><code>0.12upgrade</code></a>
</li>
<li>
<a href="/docs/cli/commands/0.13upgrade.html"><code>0.13upgrade</code></a>
</li>
</ul>
</li>
<li>
<a href="#">Internals</a>
<ul class="nav">
<li>
<a href="/docs/internals/index.html">Overview</a>
</li>
<li>
<a href="/docs/internals/credentials-helpers.html">Credentials Helpers</a>
</li>
<li>
<a href="/docs/internals/debugging.html">Debugging OpenTF</a>
</li>
<li>
<a href="/docs/internals/json-format.html">JSON Output Format</a>
</li>
<li>
<a href="/docs/internals/login-protocol.html">Login Protocol</a>
</li>
<li>
<a href="/docs/internals/machine-readable-ui.html">Machine-Readable UI</a>
</li>
<li>
<a href="/docs/internals/module-registry-protocol.html">Module Registry Protocol</a>
</li>
<li>
<a href="/docs/internals/provider-meta.html">Provider Metadata</a>
</li>
<li>
<a href="/docs/internals/provider-network-mirror-protocol.html">Provider Network Mirror Protocol</a>
</li>
<li>
<a href="/docs/internals/provider-registry-protocol.html">Provider Registry Protocol</a>
</li>
<li>
<a href="/docs/internals/remote-service-discovery.html">Remote Service Discovery</a>
</li>
<li>
<a href="/docs/internals/graph.html">Resource Graph</a>
</li>
</ul>
</li>
</ul>
<%= partial("layouts/otherdocs", :locals => { :skip => "OpenTF CLI" }) %>
<% end %>
<%= yield %>
<% end %>

View File

@ -1,27 +0,0 @@
<% wrap_layout :inner do %>
<% content_for :sidebar do %>
<h4><a href="/downloads.html">Downloads</a></h4>
<ul class="nav docs-sidenav">
<li<%= sidebar_current("downloads-terraform") %>>
<a href="/downloads.html">Download OpenTF</a>
</li>
<li<%= sidebar_current("docs-cli-install-apt") %>>
<a href="/docs/cli/install/apt.html">Debian/Ubuntu APT Packages</a>
</li>
<li<%= sidebar_current("docs-cli-install-yum") %>>
<a href="/docs/cli/install/yum.html">RHEL/Fedora Yum Packages</a>
</li>
<li<%= sidebar_current("upgrade-guides") %>>
<a href="/upgrade-guides/index.html">Upgrade Guides</a>
</li>
</ul>
<%= partial("layouts/otherdocs", :locals => { :skip => "Download OpenTF" }) %>
<% end %>
<%= yield %>
<% end %>

View File

@ -1,58 +0,0 @@
<% wrap_layout :inner do %>
<% content_for(:custom_share) do %>
<meta name="twitter:card" content="summary_large_image" />
<meta property="og:image" content="<%= image_url("og-image-large.png") %>"/>
<% end %>
<% content_for :sidebar do %>
<h4><a href="/intro/index.html">Introduction to OpenTF</a></h4>
<ul class="nav docs-sidenav">
<li>
<a href="/intro/index.html">What is OpenTF?</a>
</li>
<li>
<a href="/intro/use-cases.html">Use Cases</a>
</li>
<li>
<a href="/guides/core-workflow.html">The Core OpenTF Workflow</a>
</li>
<li><a href="/docs/cloud/guides/recommended-practices/index.html">OpenTF Recommended Practices</a>
<ul class="nav">
<li><a href="/docs/cloud/guides/recommended-practices/part1.html">Part 1: Workflow Overview</a></li>
<li><a href="/docs/cloud/guides/recommended-practices/part2.html">Part 2: Evaluating Current Practices</a></li>
<li><a href="/docs/cloud/guides/recommended-practices/part3.html">Part 3: Evolving Your Practices</a></li>
<li><a href="/docs/cloud/guides/recommended-practices/part3.1.html">Part 3.1: From Manual to Semi-Automated</a></li>
<li><a href="/docs/cloud/guides/recommended-practices/part3.2.html">Part 3.2: From Semi-Automated to Infrastructure as Code</a></li>
<li><a href="/docs/cloud/guides/recommended-practices/part3.3.html">Part 3.3: From Infrastructure as Code to Collaborative IaC</a></li>
<li><a href="/docs/cloud/guides/recommended-practices/part3.4.html">Part 3.4: Advanced Improvements</a></li>
</ul>
</li>
<li>
<a href="/intro/vs/index.html">OpenTF vs. Other</a>
<ul class="nav">
<li>
<a href="/intro/vs/chef-puppet.html">Chef, Puppet, etc.</a>
</li>
<li>
<a href="/intro/vs/cloudformation.html">CloudFormation, Heat, etc.</a>
</li>
<li>
<a href="/intro/vs/boto.html">Boto, Fog, etc.</a>
</li>
<li>
<a href="/intro/vs/custom.html">Custom Solutions</a>
</li>
</ul>
</li>
</ul>
<%= partial("layouts/otherdocs", :locals => { :skip => "Introduction to OpenTF" }) %>
<% end %>
<%= yield %>
<% end %>

File diff suppressed because it is too large Load Diff

32472
website/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,15 +2,37 @@
"name": "opentf-docs-preview",
"private": "true",
"scripts": {
"build": "./scripts/website-build.sh",
"content-check": "hc-content --config base-docs"
"lint": "eslint . --ext mdx"
},
"devDependencies": {
"@hashicorp/platform-cli": "^2.6.0",
"@hashicorp/platform-content-conformance": "^0.0.10",
"next": "^12.1.0"
"eslint": "^8.48.0",
"eslint-plugin-mdx": "^2.2.0",
"remark-cli": "^11.0.0",
"remark-frontmatter": "^4.0.1",
"remark-lint-no-dead-urls": "^1.1.0",
"remark-preset-lint-consistent": "^5.1.2",
"remark-preset-lint-recommended": "^6.1.3",
"remark-validate-links": "^12.1.1"
},
"engines": {
"npm": ">=7.0.0"
"npm": ">=8.0.0"
},
"remarkConfig": {
"settings": {},
"plugins": [
"remark-validate-links",
"remark-lint-no-dead-urls",
"remark-frontmatter",
"remark-preset-lint-consistent",
"remark-preset-lint-recommended",
[
"remark-lint-heading-style",
"atx"
],
[
"remark-lint-list-item-indent",
"space"
]
]
}
}

View File

@ -1,15 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
# This is run during the website build step to determine if we should skip the build or not.
# More information: https://vercel.com/docs/platform/projects#ignored-build-step
if [[ "$VERCEL_GIT_COMMIT_REF" == "stable-website" ]] ; then
# Proceed with the build if the branch is stable-website
echo "✅ - Build can proceed"
exit 1;
else
# Check for differences in the website directory
git diff --quiet HEAD^ HEAD ./
fi

View File

@ -1,50 +0,0 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
# Repo which we are cloning and executing npm run build:deploy-preview within
REPO_TO_CLONE=dev-portal
# Set the subdirectory name for the base project
PREVIEW_DIR=website-preview
# The directory we want to clone the project into
CLONE_DIR=website-preview
# The product for which we are building the deploy preview
PRODUCT=opentf
# Preview mode, controls the UI rendered (either the product site or developer). Can be `io` or `developer`
PREVIEW_MODE=developer
# Get the git branch of the commit that triggered the deploy preview
# This will power remote image assets in local and deploy previews
CURRENT_GIT_BRANCH=$VERCEL_GIT_COMMIT_REF
# This is where content files live, relative to the website-preview dir. If omitted, "../content" will be used
LOCAL_CONTENT_DIR=../docs
from_cache=false
if [ -d "$PREVIEW_DIR" ]; then
echo "$PREVIEW_DIR found"
CLONE_DIR="$PREVIEW_DIR-tmp"
from_cache=true
fi
# Clone the base project, if needed
echo "⏳ Cloning the $REPO_TO_CLONE repo, this might take a while..."
git clone --depth=1 "https://github.com/hashicorp/$REPO_TO_CLONE.git" "$CLONE_DIR"
if [ "$from_cache" = true ]; then
echo "Setting up $PREVIEW_DIR"
cp -R "./$CLONE_DIR/." "./$PREVIEW_DIR"
fi
# cd into the preview directory project
cd "$PREVIEW_DIR"
# Run the build:deploy-preview start script
PREVIEW_FROM_REPO=$PRODUCT \
IS_CONTENT_PREVIEW=true \
PREVIEW_MODE=$PREVIEW_MODE \
REPO=$PRODUCT \
HASHI_ENV=project-preview \
LOCAL_CONTENT_DIR=$LOCAL_CONTENT_DIR \
CURRENT_GIT_BRANCH=$CURRENT_GIT_BRANCH \
npm run build:deploy-preview

View File

@ -1,42 +0,0 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
# Repo which we are cloning and executing npm run build:deploy-preview within
REPO_TO_CLONE=dev-portal
# Set the subdirectory name for the dev-portal app
PREVIEW_DIR=website-preview
# The product for which we are building the deploy preview
PRODUCT=opentf
# Preview mode, controls the UI rendered (either the product site or developer). Can be `io` or `developer`
PREVIEW_MODE=developer
# Get the git branch of the commit that triggered the deploy preview
# This will power remote image assets in local and deploy previews
CURRENT_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
# This is where content files live, relative to the website-preview dir. If omitted, "../content" will be used
LOCAL_CONTENT_DIR=../docs
should_pull=true
# Clone the dev-portal project, if needed
if [ ! -d "$PREVIEW_DIR" ]; then
echo "⏳ Cloning the $REPO_TO_CLONE repo, this might take a while..."
git clone --depth=1 https://github.com/hashicorp/$REPO_TO_CLONE.git "$PREVIEW_DIR"
should_pull=false
fi
cd "$PREVIEW_DIR"
# If the directory already existed, pull to ensure the clone is fresh
if [ "$should_pull" = true ]; then
git pull origin main
fi
# Run the dev-portal content-repo start script
REPO=$PRODUCT \
PREVIEW_FROM_REPO=$PRODUCT \
LOCAL_CONTENT_DIR=$LOCAL_CONTENT_DIR \
CURRENT_GIT_BRANCH=$CURRENT_GIT_BRANCH \
PREVIEW_MODE=$PREVIEW_MODE \
npm run start:local-preview

View File

@ -1,5 +0,0 @@
{
"github": {
"silent": true
}
}