You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/terraform-docs-common/docs/cloud-docs/stacks/deploy/configuration-versions.mdx
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,11 @@ You can also create a configuration version using the HCP Terraform API. To lear
66
66
67
67
## Review configuration versions
68
68
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:
70
74
71
75
- How long ago the configuration version was created.
72
76
- 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
79
83
80
84
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.
81
85
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
+
82
88
## Next steps
83
89
84
90
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.
Copy file name to clipboardExpand all lines: content/terraform-docs-common/docs/cloud-docs/stacks/deploy/runs.mdx
+43-40Lines changed: 43 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ To learn more about how deployment runs work, including how they update Stack de
12
12
13
13
## Requirements
14
14
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:
16
16
*[Organization-level **View all projects**](/terraform/cloud-docs/users-teams-organizations/permissions#view-all-projects) or higher
17
17
*[Project-level **Write**](/terraform/cloud-docs/users-teams-organizations/permissions#write) or higher
18
18
@@ -26,72 +26,75 @@ If you are not already on your Stack's deployment page, navigate to it:
26
26
1. Select the Stack you want to review.
27
27
1. Select **Deployments** in the side navigation.
28
28
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.
30
30
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.
31
32
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
33
34
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.
35
36
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.
37
38
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:
39
40
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.
44
50
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).
46
52
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.
48
54
49
-
### Check deployment health
55
+
### Deployment run status
50
56
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:
52
58
53
59
| Status | Description |
54
60
| :---- | :---- |
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. |
60
67
68
+
## Approve plans
61
69
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.
67
71
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.
74
75
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.
76
79
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**.
80
83
81
84
### Convergence checks
82
85
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.
84
89
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).
86
91
87
92
## Deferred changes
88
93
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.
90
95
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.
92
97
93
98
-> **Hands-on**: Complete the [Manage Kubernetes workloads with stacks](/terraform/tutorials/cloud/stacks-eks-deferred) tutorial to create plans with deferred changes.
94
99
95
100
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