Skip to content

Commit 079f6aa

Browse files
committed
Last article
1 parent 1b75894 commit 079f6aa

File tree

2 files changed

+50
-41
lines changed

2 files changed

+50
-41
lines changed

content/terraform-docs-common/docs/cloud-docs/stacks/deploy/configuration-versions.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ You can also create a configuration version using the HCP Terraform API. To lear
6666

6767
## Review configuration versions
6868

69-
The **Configurations** page contains a numbered list of your configuration versions. Clicking on an individual configuration version reveals the following:
69+
The **Configurations** page contains a numbered sequential list of your configuration versions.
70+
71+
Configuration versions create deployment runs for each of your Stack's deployments. HCP Terraform marks each configuration version as **Completed** if it created deployment runs for all of your Stack's deployments, or **Failed** if it failed out and could not create the necessary deployment runs.
72+
73+
Clicking on an individual configuration version reveals the following:
7074

7175
- How long ago the configuration version was created.
7276
- The latest commit that HCP Terraform based this configuration version on and who made that commit.
@@ -79,6 +83,8 @@ Clicking the ellipsis next to a run reveals options to **View deployment run** o
7983

8084
Clicking **Details** reveals any associated commit message with the run, and if there were any updates for components sourced from any registry modules or external repositories.
8185

86+
Clicking on a Stack’s **Inputs** reveals a list of the inputs this Stack has access to from `upstream_input` blocks, along with the upstream Stacks that supply those inputs. Clicking on a Stack’s **Outputs** reveals a list of the outputs of this Stack and any downstream Stacks that intake those outputs. To learn more about passing data from one Stack to another, refer to [Pass data from one Stack to another](/terraform/language/stacks/deploy/pass-data).
87+
8288
## Next steps
8389

8490
Learn about [deployment runs](/terraform/cloud-docs/stacks/deploy/runs) or how to [approve or discard deployment run plans](/terraform/cloud-docs/stacks/deploy/runs) to manage your deployments.

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

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To learn more about how deployment runs work, including how they update Stack de
1212

1313
## Requirements
1414

15-
To view a Stack and its plans, you must also be a member of a team in your organization with one of the following permissions:
15+
To view a Stack and its deployment runs, you must also be a member of a team in your organization with one of the following permissions:
1616
* [Organization-level **View all projects**](/terraform/cloud-docs/users-teams-organizations/permissions#view-all-projects) or higher
1717
* [Project-level **Write**](/terraform/cloud-docs/users-teams-organizations/permissions#write) or higher
1818

@@ -26,72 +26,75 @@ If you are not already on your Stack's deployment page, navigate to it:
2626
1. Select the Stack you want to review.
2727
1. Select **Deployments** in the side navigation.
2828

29-
A Stack's **Overview** page displays the following information:
29+
A Stack's **Deployments** page displays a list of all of that Stack's deployments. Each deployment lists the latest available configuration version for that deployment.
3030

31+
Click **View run history** to view a list of all of the configuration versions a deployment has executed deployment runs for, and the status of each run. You can review the details of a deployment run by clicking on a specific configuration version.
3132

32-
Clicking on a Stack’s **Inputs** reveals a list of the inputs this Stack has access to from `upstream_input` blocks, along with the upstream Stacks that supply those inputs. Clicking on a Stack’s **Outputs** reveals a list of the outputs of this Stack and any downstream Stacks that intake those outputs. To learn more about passing data from one Stack to another, refer to [Pass data from one Stack to another](/terraform/language/stacks/deploy/pass-data).
33+
## View deployment runs
3334

34-
To view all of the plans for a deployment, click the name of the deployment you want to review.
35+
A deployment run is a combination of an individual configuration version and one of your Stack's deployments.
3536

36-
### View plans
37+
You can review the latest deployment run from the **Deployments** page by clicking on the configuration version number under **Activity**. You can also view deployment runs for specific versions on the **Configurations** page by selecting a version and clicking on the name of a specific deployment.
3738

38-
A Stack deployment can have multiple plans. In a deployment's page, underneath **Latest plans**, each deployment plan lists:
39+
A deployment run consists of the steps that Terraform can perform to update that deployment to match the associated configuration version. All deployment run pages display the following information:
3940

40-
* The plan name
41-
* The trigger why HCP Terraform created this plan
42-
* The configuration version HCP Terraform created the plan with
43-
* When HCP Terraform created the plan
41+
- The ID of the deployment run.
42+
- The name of the associated deployment.
43+
- The configuration version number associated with this deployment run.
44+
- The status of the deployment run.
45+
- If a deployment run was approve, the name of the approver, and any comment they left when approving.
46+
- When HCP Terraform created the run.
47+
- Any infrastructure resources the deployment run plans to create, update, or destroy.
48+
- A button to **Approve all plans** for this configuration version, approving this deployment run and other associated runs for this configuration version.
49+
- A button to **Cancel run** to discard this deployment run.
4450

45-
You can see a plan’s full details by clicking the plan’s name or an abbreviated list of the plan’s changes by clicking **Quick View**. You can also click **View all plans** to display a list of all the plans for this deployment. You can filter plans by [health status](#check-deployment-health) in the list of all plans.
51+
HCP Terraform stores the state of Stacks in files corresponding to each deployment of that Stack. After applying any plan, HCP Terraform displays a **View state** button next to each step of that plan to let you view a sanitized version of the state for the deployment at that step. To learn more about how state works for deployments, refer to [State in Stacks](/terraform/cloud-docs/stacks/state).
4652

47-
Each plan includes that plan's inputs and outputs, a timeline detailing when the plan started, when the plan received its configuration version, and when it was approved.
53+
If you have enabled [debug logging](/terraform/cloud-docs/stacks/configure) for your Stack, you can download detailed logs of each step of your deployment run by expanding the **Inspect** dropdown.
4854

49-
### Check deployment health
55+
### Deployment run status
5056

51-
Click **Overview** in the sidebar of your Stack to view the status of each of your deployments.
57+
A deployment run can be in one of several states:
5258

5359
| Status | Description |
5460
| :---- | :---- |
55-
| Healthy | HCP Terraform is not applying this deployment, no plans await approval, and no diagnostic alerts exist. |
56-
| Deploying | A plan is approved, and HCP Terraform is applying it. |
57-
| Plans waiting for approval | HCP Terraform created a plan successfully and is waiting for approval. |
58-
| Error diagnostics | The deployment has error diagnostic alerts. |
59-
| Warning diagnostics | The deployment has warning diagnostic alerts. |
61+
| Plan: Queued | HCP Terraform is preparing to create a plan for this deployment. |
62+
| Plan: Started | HCP Terraform is starting to create a plan for a deployment. |
63+
| Plan: Running | HCP Terraform is creating a plan for a deployment. |
64+
| Plan: Pending operator | HCP Terraform created a plan for a deployment and is waiting for you to approve that plan. |
65+
| Apply: Queued | HCP Terraform is preparing to apply a plan for this deployment. |
66+
| Errored | The deployment run has encountered an error. Review the deployment run's errors to learn more. |
6067

68+
## Approve plans
6169

62-
## Download plan data
63-
64-
You can download Stack plan data to debug and analyze how your Stack changes over time.
65-
66-
Select one of the following options in the **Inspect** drop-down to perform the associated action:
70+
Like traditional Terraform plans, Stack deployment runs list the changes that occur if you approve that plan. Each deployment run lists its expected resource changes for that deployment, and you can review those changes to whether to apply a plan. You can manage each deployment plan independently, so any plans you approve only affect the current deployment you are interacting with.
6771

68-
* **View plan orchestration results** displays HCP Terraform's decisions while making this plan.
69-
* **Download plan event stream** downloads a log file of your plan’s events.
70-
* **Download plan description** downloads a file with all plan information.
71-
* **View apply orchestration results** displays HCP Terraform's decisions to apply this plan.
72-
* **Download apply event stream** downloads a log file of your plan’s events.
73-
* **Download apply description** downloads a file with all the information about this applied plan.
72+
To approve a deployment run's plan you can perform the following steps:
73+
1. On the **Configurations** page, click on a specific configuration version, then click on the ellipsis next to a deployment and select **View deployment run**.
74+
1. On the deployment run page, you can click **Approve plan** to approve the plan for this deployment, or **Approve plan with comment** to approve the plan and add a comment.
7475

75-
## Approve plans
76+
You can also approve a deployment run's plan from the **Deployments** page:
77+
1. On the **Deployments** page, click on the configuration version number under **Activity**.
78+
1. Click **Approve plan** to approve the plan for this deployment, or **Approve plan with comment** to approve the plan and add a comment.
7679

77-
Like traditional Terraform plans, Stack deployment plans list the changes that will occur if you approve that plan. Each component lists its expected resource changes, and you can review those changes as you decide whether to apply a plan.
78-
79-
When viewing a deployment plan, HCP Terraform notes if that plan is awaiting approval. Click **Approve plan** if you want HCP Terraform to apply a plan to this deployment or **Discard plan** to ignore it. You manage each deployment independently, so any plans you approve only affect the current deployment you are interacting with.
80+
To approve all of the deployment runs for a specific configuration version, you can do either of the following:
81+
1. Click **Approve all plans** on a deployment run to approve all pending plans for this configuration version across all deployments.
82+
1. On the **Configurations** page, click on a specific configuration version, then click on the ellipsis next to a specific deployment and click **Approve all plans**.
8083

8184
### Convergence checks
8285

83-
After applying any plan, HCP Terraform automatically triggers a plan called a convergence check. A convergence check is a replan to ensure components do not have any [deferred changes](#deferred-changes). HCP Terraform continues to trigger new plans until the convergence check returns a plan that does not contain changes.
86+
By default, each Stack has an `auto_approve` rule named `empty_plan`, which auto-approves a plan if it does not contain changes.
87+
88+
After applying any step in a plan, HCP Terraform automatically triggers a step called a convergence check. A convergence check is a replan to ensure components do not have any [deferred changes](#deferred-changes). HCP Terraform continues to trigger new replan steps until the convergence check returns an empty plan, indicating that the deployment has reached convergence.
8489

85-
By default, each Stack has an `auto_approve` rule named `empty_plan`, which auto-approves a plan if it does not contain changes. When a convergence check contains no changes, HCP Terraform auto-applies that plan.
90+
To learn more about deployment runs and their steps, refer to [Stack deployment runs](/terraform/cloud-docs/stacks/runs).
8691

8792
## Deferred changes
8893

89-
Like with Terraform configuration files, HCP Terraform generates a dependency graph and creates resources defined in `*.tfstack.hcl` and `*.tfdeploy.hcl` files.
94+
Like with Terraform configuration files, HCP Terraform generates a dependency graph and creates resources defined in `<NAME>.tfcomponent.hcl` and `<NAME>.tfdeploy.hcl` files.
9095

91-
When you deploy a Stack with resources that depend on resources provisioned by other components in your stack, HCP Terraform recognizes the dependency between components and automatically defers that plan until HCP Terraform can complete it successfully. Plans with deferred changes are plans with resources that depend on resources that don't exist yet, requiring follow-up plans.
96+
When you deploy a Stack with resources that depend on resources provisioned by other components in your stack, HCP Terraform recognizes the dependency between components and automatically defers the step in that plan until HCP Terraform can complete it successfully.
9297

9398
-> **Hands-on**: Complete the [Manage Kubernetes workloads with stacks](/terraform/tutorials/cloud/stacks-eks-deferred) tutorial to create plans with deferred changes.
9499

95100
HCP Terraform notifies you in the UI if a plan contains deferred changes. Approving a plan with deferred changes makes HCP Terraform automatically create a follow-up plan to properly set up resources in the order of operations those resources require.
96-
97-
After applying a plan with deferred changes, HCP Terraform notifies you of any replans it creates with a link to **View replan**. You can review the replan to ensure HCP Terraform created your resources as expected.

0 commit comments

Comments
 (0)