Skip to content

Commit

Permalink
Merge pull request #36083 from hashicorp/docs/seo-updates
Browse files Browse the repository at this point in the history
Docs/seo updates
  • Loading branch information
trujillo-adam authored Dec 16, 2024
2 parents e6bd282 + 922aff2 commit 1680b0d
Show file tree
Hide file tree
Showing 93 changed files with 669 additions and 778 deletions.
43 changes: 15 additions & 28 deletions website/data/cli-nav-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,7 @@
{ "title": "Overview", "path": "code" },
{ "title": "<code>console</code>", "href": "/cli/commands/console" },
{ "title": "<code>fmt</code>", "href": "/cli/commands/fmt" },
{ "title": "<code>validate</code>", "href": "/cli/commands/validate" },
{
"title": "<code>0.13upgrade</code>",
"href": "/cli/commands/0.13upgrade"
},
{
"title": "<code>0.12upgrade</code>",
"href": "/cli/commands/0.12upgrade"
}
{ "title": "<code>validate</code>", "href": "/cli/commands/validate" }
]
},
{
Expand All @@ -62,22 +54,18 @@
]
},
{
"title": "Importing Infrastructure",
"title": "Import Infrastructure",
"routes": [
{ "title": "Overview", "path": "import" },
{ "title": "Import existing resources", "path": "import/usage" },
{
"title": "<code>import</code>",
"title": "Reference",
"href": "/cli/commands/import"
},
{ "title": "Usage Tips", "path": "import/usage" },
{
"title": "Resource Importability",
"path": "import/importability"
}
]
},
{
"title": "Manipulating State",
"title": "Manually Update State",
"routes": [
{ "title": "Overview", "path": "state" },
{
Expand Down Expand Up @@ -266,7 +254,6 @@
{ "title": "<code>apply</code>", "href": "/cli/commands/apply" },
{ "title": "<code>console</code>", "href": "/cli/commands/console" },
{ "title": "<code>destroy</code>", "href": "/cli/commands/destroy" },
{ "title": "<code>env</code>", "href": "/cli/commands/env" },
{ "title": "<code>fmt</code>", "href": "/cli/commands/fmt" },
{
"title": "<code>force-unlock</code>",
Expand Down Expand Up @@ -294,10 +281,6 @@
"title": "<code>providers schema</code>",
"href": "/cli/commands/providers/schema"
},
{
"title": "<code>push (deprecated)</code>",
"href": "/cli/commands/push"
},
{ "title": "<code>refresh</code>", "href": "/cli/commands/refresh" },
{ "title": "<code>show</code>", "href": "/cli/commands/show" },
{ "title": "<code>state</code>", "href": "/cli/commands/state" },
Expand Down Expand Up @@ -350,11 +333,11 @@
"href": "/cli/commands/workspace/show"
},
{
"title": "<code>0.12upgrade</code>",
"title": "0.12upgrade",
"href": "/cli/commands/0.12upgrade"
},
{
"title": "<code>0.13upgrade</code>",
"title": "0.13upgrade",
"href": "/cli/commands/0.13upgrade"
}
]
Expand All @@ -367,7 +350,6 @@
{ "title": "apply", "path": "commands/apply" },
{ "title": "console", "path": "commands/console" },
{ "title": "destroy", "path": "commands/destroy" },
{ "title": "env", "path": "commands/env" },
{ "title": "fmt", "path": "commands/fmt" },
{ "title": "force-unlock", "path": "commands/force-unlock" },
{ "title": "get", "path": "commands/get" },
Expand All @@ -388,7 +370,6 @@
{ "title": "providers schema", "path": "commands/providers/schema" }
]
},
{ "title": "push (deprecated)", "path": "commands/push" },
{ "title": "refresh", "path": "commands/refresh" },
{ "title": "show", "path": "commands/show" },
{
Expand Down Expand Up @@ -426,8 +407,14 @@
{ "title": "workspace show", "path": "commands/workspace/show" }
]
},
{ "title": "0.12upgrade", "path": "commands/0.12upgrade" },
{ "title": "0.13upgrade", "path": "commands/0.13upgrade" }
{
"title": "0.12upgrade",
"path": "commands/0.12upgrade"
},
{
"title": "0.13upgrade",
"path": "commands/0.13upgrade"
}
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion website/data/internals-nav-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"path": "provider-registry-protocol"
},
{
"title": "Resource Graph",
"title": "Dependency Graph",
"path": "graph"
},
{
Expand Down
34 changes: 18 additions & 16 deletions website/docs/cli/auth/index.mdx
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
---
page_title: Authentication - Terraform CLI
page_title: Get an API token for HCP Terraform or Terraform Enterprise
description: >-
Documentation about the login and logout commands that help automate getting
an API token for your HCP Terraform account.
Use the `terraform login` and `terraform logout` commands get
an API token for your HCP Terraform or Terraform Enterprise account.
---

# CLI Authentication
# Get an API token for HCP Terraform and Terraform Enterprise

This topic describes how to use the `terraform login` and `terraform logout` to authenticate with HCP Terraform and Terraform Enterprise.

> **Hands-on:** Try the [Authenticate the CLI with HCP Terraform](/terraform/tutorials/cloud/cloud-login?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial.
## Overview

[HCP Terraform](https://cloud.hashicorp.com/products/terraform) and
[Terraform Enterprise](/terraform/enterprise) are platforms that perform
Terraform runs to provision infrastructure, offering a collaboration-focused
environment that makes it easier for teams to use Terraform together. (For
expediency, the content below refers to both products as "HCP Terraform.")
environment that makes it easier for teams to use Terraform together.

You can integrate the Terraform CLI with HCP Terraform and Terraform Enterprise in the following ways:

- Use the Terraform CLI as a front-end for [CLI-driven runs](/terraform/cloud-docs/run/cli) in HCP Terraform
- Use HCP Terraform or Terraform Enterprise as a state backend and a private module registry.

Terraform CLI integrates with HCP Terraform in several ways — it can be a
front-end for [CLI-driven runs](/terraform/cloud-docs/run/cli) in HCP Terraform,
and can also use HCP Terraform as a state backend and a private module
registry. All of these integrations require you to authenticate Terraform CLI
These integrations require you to authenticate the Terraform CLI
with your HCP Terraform account.

The best way to handle CLI authentication is with the `login` and `logout`
commands, which help automate the process of getting an API token for your
HCP Terraform user account.
## Authentication

For details, see:
Run the `terraform login` command to generate an API token for your HCP Terraform user account. Refer to the [`terraform login` command](/terraform/cli/commands/login) reference documentation for details.

- [The `terraform login` command](/terraform/cli/commands/login)
- [The `terraform logout` command](/terraform/cli/commands/logout)
Run the `terraform logout` command to end your HCP Terraform or Terraform Enterprise session. Refer to the [`terraform logout` command](/terraform/cli/commands/logout) reference documentation for details.
6 changes: 3 additions & 3 deletions website/docs/cli/cloud/command-line-arguments.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
page_title: Command Line Arguments
description: Command Line Arguments
page_title: -ignore-remote-version reference
description: Use the -ignore-remote-version flag to override CLI-driven commands for HCP Terraform runs.
---

# Command Line Arguments
# `-ignore-remote-version` reference

When your configuration includes a `cloud` block, commands that
make local modifications to Terraform state and then push them back up to the remote workspace
Expand Down
4 changes: 2 additions & 2 deletions website/docs/cli/cloud/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
page_title: Using HCP Terraform - Terraform CLI
page_title: Use HCP Terraform or Terraform Enterprise with the Terraform CLI
description: >-
Learn how to use HCP Terraform and Terraform Enterprise on the command line with the Terraform CLI.
---

# Using HCP Terraform with Terraform CLI
# Use HCP Terraform with the Terraform CLI

The Terraform CLI integration with HCP Terraform lets you use HCP Terraform and Terraform Enterprise on the command line. In the documentation HCP Terraform instructions also apply to Terraform Enterprise, except where explicitly stated.

Expand Down
13 changes: 9 additions & 4 deletions website/docs/cli/code/index.mdx
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
---
page_title: Writing and Modifying Code - Terraform CLI
page_title: Format and validate Terraform configuration using the Terraform CLI
description: >-
Learn commands that help validate, format, and upgrade code written in the
Terraform Configuration Language.
Learn about the Terraform commands that validate, format, and upgrade code written in HCL.
---

# Writing and Modifying Terraform Code
# Write and modify Terrafrom configuration from the CLI

This topic provides an overview of the Terraform CLI commands you can use to develop, format, and validate your Terraform configuration.

## Introduction

The [Terraform language](/terraform/language) is Terraform's primary
user interface, and all of Terraform's workflows rely on configurations written
in the Terraform language.

## Workflows

Terraform CLI includes several commands to make Terraform code more convenient
to work with. Integrating these commands into your editing workflow can
potentially save you time and effort.
Expand Down
8 changes: 4 additions & 4 deletions website/docs/cli/commands/0.12upgrade.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
page_title: 'Command: 0.12upgrade'
page_title: terraform 0.12upgrade command reference
description: >-
The 0.12upgrade subcommand automatically rewrites existing configurations for
The `terraform 0.12upgrade` command automatically rewrites existing configurations for
Terraform 0.12 compatibility.
---

# Command: 0.12upgrade
# `terraform 0.12upgrade` command

The `terraform 0.12upgrade` command applies several automatic upgrade rules to
help prepare a module that was written for Terraform v0.11 to be used
Expand Down Expand Up @@ -114,4 +114,4 @@ prompt, so be sure you have a clean work tree before running it.

Because upgrading requires access to the configuration's provider plugins,
all of the directories must be initialized with `terraform init` prior to
running the above.
running the above.
8 changes: 4 additions & 4 deletions website/docs/cli/commands/0.13upgrade.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
page_title: 'Command: 0.13upgrade'
page_title: terraform 0.13upgrade command reference
description: >-
The 0.13upgrade subcommand updates existing configurations to use the new
The `terraform 0.13upgrade` command updates existing configurations to use the new
provider source features from Terraform 0.13.
---

# Command: 0.13upgrade
# `terraform 0.13upgrade` command

The `terraform 0.13upgrade` command updates existing configuration to add an
explicit `source` attribute for each provider used in a given module. The
Expand Down Expand Up @@ -86,4 +86,4 @@ Select-Object -Unique | ForEach-Object { terraform 0.13upgrade -yes $_.FullName
```

Note that the above commands include the `-yes` option to override the
interactive prompt, so be sure you have a clean work tree before running it.
interactive prompt, so be sure you have a clean work tree before running it.
9 changes: 3 additions & 6 deletions website/docs/cli/commands/apply.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
page_title: 'Command: apply'
description: >-
The terraform apply command executes the actions proposed in a Terraform plan
page_title: terraform apply command reference
description: The `terraform apply` command executes the actions proposed in a Terraform plan
to create, update, or destroy infrastructure.
---

# Command: apply
# `terraform apply` command

The `terraform apply` command executes the actions proposed in a Terraform
plan.
Expand All @@ -16,8 +15,6 @@ plan.

Usage: `terraform apply [options] [plan file]`



### Automatic Plan Mode

When you run `terraform apply` without passing a saved plan file, Terraform automatically creates a new execution plan as if you had run [`terraform plan`](/terraform/cli/commands/plan), prompts you to approve that plan, and takes the indicated actions. You can use all of the [planning modes](/terraform/cli/commands/plan#planning-modes) and
Expand Down
8 changes: 4 additions & 4 deletions website/docs/cli/commands/console.mdx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
page_title: 'Command: console'
page_title: terraform console command reference
description: >-
The terraform console command provides an interactive console for evaluating
The `terraform console` command opens an interactive console for evaluating
expressions.
---

# Command: console
# `terraform console` command

The `terraform console` command provides an interactive console for
The `terraform console` command opens an interactive console for
evaluating [expressions](/terraform/language/expressions).

## Usage
Expand Down
9 changes: 4 additions & 5 deletions website/docs/cli/commands/destroy.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
page_title: 'Command: destroy'
page_title: terraform destroy command reference
description: >-
The terraform destroy command destroys all objects managed by a Terraform
The `terraform destroy` command deprovisions all objects managed by a Terraform
configuration.
---

# Command: destroy
# `terraform destroy` command

The `terraform destroy` command is a convenient way to destroy all remote
objects managed by a particular Terraform configuration.
The `terraform destroy` command deprovisions all objects managed by a Terraform configuration.

While you will typically not want to destroy long-lived objects in a production
environment, Terraform is sometimes used to manage ephemeral infrastructure
Expand Down
12 changes: 0 additions & 12 deletions website/docs/cli/commands/env.mdx

This file was deleted.

29 changes: 14 additions & 15 deletions website/docs/cli/commands/fmt.mdx
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
---
page_title: 'Command: fmt'
page_title: terraform fmt command reference
description: >-
The terraform fmt command rewrites configuration files to a canonical format
The `terraform fmt` command formats Terraform configuration contents so that it matches the canonical format
and style.
---

# Command: fmt
# `terraform fmt` command

The `terraform fmt` command is used to rewrite Terraform configuration files
to a canonical format and style. This command applies a subset of
The `terraform fmt` command formats Terraform configuration file contents so that it matches the canonical format and style. This command applies a subset of
the [Terraform language style conventions](/terraform/language/style#code-formatting),
along with other minor adjustments for readability.

Other Terraform commands that generate Terraform configuration will produce
configuration files that conform to the style imposed by `terraform fmt`, so
using this style in your own files will ensure consistency.
## Introduction
Terraform commands that generate Terraform configuration produce
configuration files that conform to the style imposed by `terraform fmt`. Follow this style in your files to ensure consistency.

The canonical format may change in minor ways between Terraform versions, so
after upgrading Terraform we recommend to proactively run `terraform fmt`
on your modules along with any other changes you are making to adopt the new
version.

We don't consider new formatting rules in `terraform fmt` to be a breaking
change in new versions of Terraform, but we do aim to minimize changes for
configurations that are already following the style examples shown in the
Terraform documentation. When adding new formatting rules, they will usually
aim to apply more of the rules already shown in the configuration examples
in the documentation, and so we recommend following the documented style even
for decisions that `terraform fmt` doesn't yet apply automatically.
We do not consider new formatting rules in `terraform fmt` to be a breaking
change in new versions of Terraform, but we minimize changes for
configurations that already follow the style examples shown in the
Terraform documentation. New formatting rules programmed into the `terraform fmt`
command are usually expansions to include existing rules from the documentation.
We recommend following the documented style even for decisions that `terraform fmt`
does not yet apply automatically.

Formatting decisions are always subjective and so you might disagree with the
decisions that `terraform fmt` makes. This command is intentionally opinionated
Expand Down
Loading

0 comments on commit 1680b0d

Please sign in to comment.