Skip to content

Commit d8dfd25

Browse files
committed
Clean up the migrate links
1 parent a22b527 commit d8dfd25

File tree

5 files changed

+19
-7
lines changed

5 files changed

+19
-7
lines changed

content/terraform-docs-common/docs/cloud-docs/migrate/index.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,16 @@ Refer to the following external article for an example of how to create a script
9090
> **Hands-on:** Complete the [Migrate to HCP Terraform in bulk](/terraform/tutorials/cloud/bulk-migrate-hcp) tutorial to get started with tf-migrate.
9191
9292
You can use the `tf-migrate` CLI tool to automatically migrate state to HCP Terraform and Terraform Enterprise. The tool does not ship with HCP Terraform. You must download and install the binary for the CLI tool separately. Refer to the [`tf-migrate` documentation](/terraform/migrate) for more information.
93+
94+
<!-- BEGIN: TFC:only name:stacks-tfe -->
95+
96+
## Migrate a workspace to a Stack
97+
98+
In HCP Terraform, there are two ways of organizing your infrastructure:
99+
100+
- Workspaces are ideal for managing a self-contained infrastructure of one Terraform root module.
101+
- Stacks are ideal for managing multiple infrastructure modules and repeating that infrastructure at scale.
102+
103+
If you have an existing workspace that you want to convert to a Stack, you can use the Terraform migrate CLI to migrate your workspace state and configuration to a Stack in HCP Terraform. Refer to the [Terraform migrate CLI](/terraform/migrate/stacks) to learn more.
104+
105+
<!-- END: TFC:only name:stacks-tfe -->

content/terraform-docs-common/docs/cloud-docs/stack-workspace.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Workspaces provide a hard separation between environments because each workspace
2828

2929
If your team uses a branching strategy where each environment maps to a separate Git branch, workspaces can align with your workflow. You can promote changes across environments through pull requests between branches. Workspaces also work well when CI/CD pipelines control promotion across environments, especially when a promotion must be gated by approvals or automated test outcomes.
3030

31-
Previously, those looking to deploy repeatable infrastructure using HCP Terraform would create separate workspaces and then use run triggers or other automation tools to coordinate changes between them. However, workspaces are not truly coupled to each other, hampering your ability to flexibly manage infrastructure as it scales. If you have a tightly orchestrated infrastructure that changes across different environments, we recommend defining a Stack.
31+
Previously, those looking to deploy repeatable infrastructure using HCP Terraform would create separate workspaces and then use run triggers or other automation tools to coordinate changes between them. However, workspaces are not truly coupled to each other, hampering your ability to flexibly manage infrastructure as it scales. If you have a tightly orchestrated infrastructure that changes across different environments, we recommend defining a Stack. If you want to migrate an existing workspace to a Stack, refer to the [Terraform migrate CLI](/terraform/migrate/stacks).
3232

3333
Workspaces do support validating your code with policies, drift detection, and a range of other features that Stacks do not support. Refer to [Feature support](#feature-support) to learn more.
3434

@@ -45,7 +45,7 @@ We recommend using Stacks if your use case meets any of the following conditions
4545
- You repeat infrastructure across different environments, regions, or accounts that require consistent and synchronized deployments.
4646
- You have a tightly orchestrated infrastructure that changes across different environments.
4747

48-
Stacks codify the entire behavior of your infrastructure lifecycle within version-controlled configuration files. To learn more about Stacks and review examples, refer to [Stack use cases](/terraform/language/stacks/use-cases).
48+
Stacks codify the entire behavior of your infrastructure lifecycle within version-controlled configuration files. To learn more about Stacks and review examples, refer to [Stack use cases](/terraform/language/stacks/use-cases). If you want to migrate an existing workspace to a Stack, refer to the [Terraform migrate CLI](/terraform/migrate/stacks).
4949

5050
Stacks were designed to simplify and scale Terraform workflows that become complex or repetitive using workspaces. When you use a Stack, HCP Terraform automatically recognizes the dependency between components, automatically deferring the component's plan and apply steps until it can complete them successfully. Learn more about how Stacks plan [deferred changes](/terraform/cloud-docs/stacks/deploy/runs#deferred-changes).
5151

content/terraform-docs-common/docs/cloud-docs/stacks/create.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ You can create a Stack using any of the following methods:
3131
- The HCP Terraform UI
3232
- The Terraform CLI
3333

34+
If you want to migrate an existing workspace to a Stack, refer to the [Terraform migrate CLI](/terraform/migrate/stacks).
35+
3436
If you are creating a Stack in an organization for the first time, you must enable Stacks for your organization. Navigate to your organization’s **Settings** page, and in the **General** settings, check the box next to **Stacks**.
3537

3638
### HCP Terraform workflow

content/terraform/v1.13.x/docs/language/block/stack/tfdeploy/deployment.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ We recommend using the `destroy` argument to remove deployments to ensure your c
156156

157157
### `import`
158158

159-
The `import` argument is a placeholder for future functionality.
159+
The `tf-migrate` CLI can migrate the state of an existing HCP Terraform workspace to a Stack deployment. The `tf-migrate` CLI automatically sets the `import` argument to `true` when importing the state of an existing workspace to a specific deployment.
160160

161161
```hcl
162162
deployment "<LABEL>" {

content/terraform/v1.14.x (beta)/docs/language/block/stack/tfdeploy/deployment.mdx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ We recommend using the `destroy` argument to remove deployments to ensure your c
155155

156156
### `import`
157157

158-
The `import` argument is a placeholder for future functionality.
158+
The `tf-migrate` CLI can migrate the state of an existing HCP Terraform workspace to a Stack deployment. The `tf-migrate` CLI automatically sets the `import` argument to `true` when importing the state of an existing workspace to a specific deployment.
159159

160160
```hcl
161161
deployment "<LABEL>" {
@@ -167,13 +167,10 @@ deployment "<LABEL>" {
167167
}
168168
```
169169

170-
<<<<<<< HEAD:content/terraform/v1.14.x (beta)/docs/language/stack/tfdeploy/deployment.mdx
171170
Terraform migrate sets the `import` argument to let HCP Terraform know that the rest of the deployments in a Stack can continue plan as normal while the deployment with `import` is migrating state.
172171

173172
To learn more about migrating a workspace to a Stack deployment, refer to [Terraform migrate](/terraform/migrate/stacks).
174173

175-
=======
176-
>>>>>>> main:content/terraform/v1.14.x (beta)/docs/language/block/stack/tfdeploy/deployment.mdx
177174
#### Summary
178175

179176
- Data type: Boolean

0 commit comments

Comments
 (0)