Skip to content

Add tf-migrate docs and tutorials to Migrate to HCP callouts #36701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion website/docs/cli/cloud/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Terraform CLI integration with HCP Terraform lets you use HCP Terraform and

Using HCP Terraform through the command line is called the [CLI-driven run workflow](/terraform/cloud-docs/run/cli). When you use the CLI workflow, operations like `terraform plan` or `terraform apply` are remotely executed in HCP Terraform's run environment by default, with log output streaming to the local terminal. This lets you use HCP Terraform features within the familiar Terraform CLI workflow, including variables encrypted at rest in an HCP Terraform workspace, cost estimates, and policy checking.

> **Hands On:** Try the [Migrate State to HCP Terraform](/terraform/tutorials/cloud/cloud-migrate) tutorial.
> **Hands On:** Try the [Migrate State to HCP Terraform](/terraform/tutorials/cloud/cloud-migrate) tutorial. To learn how to migrate multiple state files to HCP Terraform at once, try the [Migrate to HCP Terraform in bulk](/terraform/tutorials/cloud/bulk-migrate-hcp) tutorial and refer to the [Terraform migrate documentation](/terraform/cloud-docs/migrate/tf-migrate).

Workspaces can also be configured for local execution, in which case HCP Terraform only stores state. In this mode, HCP Terraform behaves just like a standard state backend.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/cli/cloud/settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: >-

This topic describes how to connect the Terraform CLI to HCP Terraform. Integrating the CLI with HCP Terraform enables the CLI to act as a client for CLI-drive workflows. Refer to [CLI-driven Run Workflow](/terraform/cloud-docs/run/cli) for additional information.

> **Hands On:** Complete the [Migrate State to HCP Terraform](/terraform/tutorials/cloud/cloud-migrate) tutorial to learn more about integrating the CLI with HCP Terraform.
> **Hands On:** Complete the [Migrate State to HCP Terraform](/terraform/tutorials/cloud/cloud-migrate) tutorial to learn more about integrating the CLI with HCP Terraform. To learn how to migrate multiple state files to HCP Terraform at once, try the [Migrate to HCP Terraform in bulk](/terraform/tutorials/cloud/bulk-migrate-hcp) tutorial and refer to the [Terraform migrate documentation](/terraform/cloud-docs/migrate/tf-migrate).

## Overview

Expand Down
6 changes: 6 additions & 0 deletions website/docs/intro/phases/collaborate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ As your team grows, you may run into the risk of concurrent operations on state

[Get started with HCP Terraform](/terraform/tutorials/cloud-get-started) and learn how to [securely store your Terraform state](/well-architected-framework/security/security-sensitive-data#storing-terraform-state).

Refer to the following resources to learn how to migrate to HCP Terraform:

- [Migrate Terraform state to HCP Terraform](/terraform/cloud-docs/migrate) documentation.
- [Migrate to HCP Terraform in bulk](/terraform/tutorials/cloud/bulk-migrate-hcp) tutorial.
- [Terraform migrate](/terraform/cloud-docs/migrate/tf-migrate) documentation.

## Implement code reviews

Implement good code practices for your Terraform configuration, including using pull requests for code changes and performing proper code reviews.
Expand Down
12 changes: 10 additions & 2 deletions website/docs/language/backend/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,19 @@ the reinitialization process, Terraform will ask if you'd like to migrate
your existing state to the new configuration. This allows you to easily
switch from one backend to another.

If you're using multiple [workspaces](/terraform/language/state/workspaces),
If you are using multiple [workspaces](/terraform/language/state/workspaces),
Terraform can copy all workspaces to the destination. If Terraform detects
you have multiple workspaces, it will ask if this is what you want to do.

If you're just reconfiguring the same backend, Terraform will still ask if you
If you are migrating multiple root Terraform configurations to HCP Terraform,
you can use the [Terraform migrate](/terraform/cloud-docs/migrate/tf-migrate)
tool to migrate all of your configurations and workspaces in bulk.

> **Hands On:** Complete the [Migrate to HCP Terraform in
bulk](/terraform/tutorials/cloud/bulk-migrate-hcp) tutorial to learn more
about migrating multiple Terraform configuration to HCP Terraform.

If you are reconfiguring the same backend, Terraform will still ask if you
want to migrate your state. You can respond "no" in this scenario.

## Remove a backend configuration
Expand Down
5 changes: 5 additions & 0 deletions website/docs/language/state/remote.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ which can then be shared between all members of a team. Terraform supports
storing state in [HCP Terraform](https://www.hashicorp.com/products/terraform/),
[HashiCorp Consul](https://www.consul.io/), Amazon S3, Azure Blob Storage, Google Cloud Storage, Alibaba Cloud OSS, and more.

> **Hands On:** Try the [Migrate State to HCP Terraform](/terraform/tutorials/cloud/cloud-migrate)
tutorial. To learn how to migrate multiple state files to HCP Terraform at once, try the
[Migrate to HCP Terraform in bulk](/terraform/tutorials/cloud/bulk-migrate-hcp) tutorial and refer
to the [Terraform migrate documentation](/terraform/cloud-docs/migrate/tf-migrate).

Remote state is implemented by a [backend](/terraform/language/backend) or by
HCP Terraform, both of which you can configure in your configuration's root module.

Expand Down