Skip to content

Commit 5796612

Browse files
committed
Rename runs
1 parent 3afc33c commit 5796612

File tree

3 files changed

+79
-14
lines changed

3 files changed

+79
-14
lines changed

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

Lines changed: 75 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,32 @@ Stacks enable you to provision and coordinate your infrastructure lifecycle at s
1010

1111
> **Hands-on**: Try out the [Deploy a Stack with HCP Terraform](/terraform/tutorials/cloud/stacks-deploy) tutorial to get started with Stacks quickly.
1212
13-
This article explains how to create a Stack in HCP Terraform using component and deployment configuration files.
13+
Before creating a Stack in HCP Terraform, write a [component configuration file](/terraform/language/stacks/component/config) to define your Stack's infrastructure, and a [deployment configuration file](/terraform/language/stacks/deploy/config) to tell HCP Terraform how to deploy your Stack.
1414

1515
## Requirements
1616

17+
<Note>
18+
1719
Stacks are not available for users on legacy HCP Terraform team plans. Learn more about [migrating to current HCP Terraform plans](/terraform/cloud-docs/overview/migrate-teams-standard).
1820

19-
To create a Stack in HCP Terraform, you must set up the following:
20-
must also be a member of a team in your organization with one of the following permissions:
21-
* [Organization-level **Manage all projects**](/terraform/cloud-docs/users-teams-organizations/permissions#manage-all-projects)
22-
* [Project-level **Maintain**](/terraform/cloud-docs/users-teams-organizations/permissions#maintain) or higher
21+
</Note>
22+
23+
To create a Stack in HCP Terraform, you must be a member of a team in your organization with one of the following permissions:
24+
- [Organization-level **Manage all projects**](/terraform/cloud-docs/users-teams-organizations/permissions#manage-all-projects)
25+
- [Project-level **Maintain**](/terraform/cloud-docs/users-teams-organizations/permissions#maintain) or higher
2326

2427
## Create a Stack
2528

26-
You can create a Stack
29+
You can create a Stack using any of the following methods:
30+
- The [HCP Terraform API](/terraform/cloud-docs/api-docs/stacks)
31+
- The HCP Terraform UI
32+
- The Terraform CLI
2733

28-
<!-- TODO: is this still true past GA? -->
34+
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**.
2935

30-
If you are creating a Stack in an organization for the first time, you should first enable Stacks for your organization. Navigate to your organization’s **Settings** page, and in the **General** settings, check the box next to **Stacks** to enable them.
36+
### HCP Terraform workflow
3137

32-
Stacks live alongside workspaces in a project. To create a new Stack in HCP Terraform, perform the following steps:
38+
Stacks live alongside workspaces in a project. To create a new Stack in HCP Terraform UI, perform the following steps:
3339

3440
1. Sign in to [HCP Terraform](https://app.terraform.io), and select the organization that contains your Stack.
3541
1. In the navigation menu, click **Projects** under **Manage**.
@@ -47,6 +53,65 @@ Stacks live alongside workspaces in a project. To create a new Stack in HCP Terr
4753
* By default, HCP Terraform fetches your Stack's configuration after creating your Stack. To fetch your Stack configuration manually, uncheck **Fetch configuration after HCP Terraform creates stack.**
4854
1. Click **Create Stack**.
4955

56+
### Terraform CLI workflow
57+
58+
Stacks live alongside workspaces in an HCP Terraform project. To create a new Stack using the Terraform CLI, perform the following steps:
59+
60+
1. Create an account or sign in to [HCP Terraform](https://app.terraform.io).
61+
1. Run `terraform login` to authenticate with HCP Terraform. Alternatively, you can manually configure credentials in the CLI config file or through environment variables. Refer to [CLI Configuration](/terraform/cli/config/config-file#environment-variable-credentials) for details.
62+
1. Run the `terraform stacks create` command, replacing the placeholders with your organization name, project name, and desired Stack name:
63+
64+
```shell-session
65+
$ terraform stacks create -organization <ORGANIZATION_NAME> -project <PROJECT_NAME> -stack-name <STACK_NAME>
66+
```
67+
68+
A Stack name must be unique within the project and can include letters, numbers, dashes (`-`), and underscores (`_`). We recommend using 90 characters or less for the name of your Stack.
69+
70+
After running the command, you can view your new Stack in the HCP Terraform UI, or by running the `terraform stacks list` command:
71+
72+
```shell-session
73+
$ terraform stacks list -organization <ORGANIZATION_NAME> -project <PROJECT_NAME>
74+
```
75+
76+
After creating your Stack, you can push up your Stack component and deployment configuration files to create a new configuration version. Use the `terraform stacks configuration upload` command to manually upload your configuration files:
77+
78+
```shell-session
79+
$ terraform stacks configuration upload -organization <ORGANIZATION_NAME> -project <PROJECT_NAME> -stack-name <STACK_NAME>
80+
```
81+
82+
The Terraform CLI uploads the configuration files, and returns a new configuration version ID and sequence number:
83+
84+
```shell-session
85+
Uploading stack configuration...
86+
87+
Configuration for Stack (id: 'st-MLQLSJVrdtGazA4aU') was uploaded
88+
Configuration ID: stc-6fSRO81hOzTPKMM
89+
Sequence Number: 1
90+
91+
See run at: <URL>
92+
```
93+
94+
A Stack configuration version is a snapshot of all of the pieces that make up your Stack. Each configuration version creates a deployment run for every deployment of your Stack in order to implement the changes in that version. To learn more, refer to [Stack deployment runs](/terraform/cloud-docs/stacks/runs).
95+
96+
After uploading your configuration, you can watch your Stack's configuration roll out using `terraform stacks configuration watch` to review a list of the deployment groups in your configuration:
97+
98+
```shell-session
99+
$ terraform stacks configuration watch -organization <ORGANIZATION_NAME> -project <PROJECT_NAME>
100+
101+
102+
[Stack Id: st-MLQLSJVrdtGazA4aU]
103+
✓ Configuration: 'stc-6fSRO81hOzTPKMM' [Completed] [11s]
104+
↻ Deployment Group: 'many_default' [Pending] [58s]
105+
↻ Deployment Group: 'some_default' [Pending] [58s]
106+
↻ Deployment Group: 'single_default' [Failed] [6s]
107+
108+
Press q to quit
109+
```
110+
111+
You can continue to use the `terraform stacks` CLI commands to directly approve deployment runs, review configuration versions, and manage your Stack. To learn more, refer to the [`terraform stacks` commands](/terraform/cli/commands/stacks).
112+
113+
Note that though you can create a Stack from the Terraform CLI, you cannot deploy a Stack locally. You can only deploy a Stack remotely in HCP Terraform, or by running your a Stack on a custom HCP Terraform agent. To learn more, refer to [Stack deployment runs](/terraform/cloud-docs/stacks/runs).
114+
50115
## Next steps
51116

52-
After creating your Stack, you can continue to iterate on your configuration and [review configuration versions](/terraform/cloud-docs/stacks/deploy/configuration-versions) or learn how to [review your Stack’s deployment plans](/terraform/cloud-docs/stacks/deploy/plans).
117+
After creating your Stack, you can continue to iterate on your configuration and [review configuration versions](/terraform/cloud-docs/stacks/deploy/configuration-versions) or learn how to [review your Stack’s deployment runs](/terraform/cloud-docs/stacks/deploy/runs).

content/terraform-docs-common/docs/cloud-docs/stacks/deploy/plans.mdx renamed to content/terraform-docs-common/docs/cloud-docs/stacks/deploy/runs.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ description: Learn how to review deployment plans in HCP Terraform Stacks.
44
tfc_only: true
55
---
66

7-
# Review deployment plans
7+
# Review deployment runs
88

9-
Deployment plans are a combination of an individual configuration version and one of your Stack's deployments. As in the traditional Terraform workflow, HCP Terraform creates plans every time a new configuration version introduces potential changes for a deployment.
9+
Deployment runs are a combination of an individual configuration version and one of your Stack's deployments. As in the traditional Terraform workflow, HCP Terraform creates runs every time a new configuration version introduces potential changes for a deployment.
1010

11-
This guide explains how to review and approve deployment plans in HCP Terraform.
11+
This guide explains how to review and approve deployment runs in HCP Terraform.
1212

1313
## Requirements
1414

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: |-
55
tfc_only: true
66
---
77

8-
# Stack runs
8+
# Stack deployment runs
99

1010
HCP Terraform is the interface for keeping track of your Stack configuration over time and the corresponding deployments for each version of your configuration. Learn how HCP Terraform executes Terraform runs to keep Stack deployments up to date.
1111

0 commit comments

Comments
 (0)