-
Notifications
You must be signed in to change notification settings - Fork 368
add documentation around archiving configuration versions #2157
Changes from all commits
afb2a7a
efa4d2f
34b9391
224163e
e18e33a
18a04f2
7766bfc
0d6c2ca
11309ae
1b3d53b
0e67dd3
e95372d
80d496a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -19,26 +19,30 @@ _States in this stage:_ | |||||
|
||||||
_Leaving this stage:_ | ||||||
|
||||||
- Proceeds automatically to the plan stage (**Planning** state) when it becomes the first run in the queue. | ||||||
- Can skip to completion (**Discarded** state) if a user discards it before it starts. | ||||||
- If the user discards the run before it starts, the run does not continue (**Discarded** state). | ||||||
- If the run is first in the queue, it proceeds automatically to the plan stage (**Planning** state). | ||||||
|
||||||
## 2. The Plan Stage | ||||||
|
||||||
A run goes through different steps during the plan stage depending on whether or not Terraform Cloud needs to fetch the configuration from VCS. Terraform Cloud automatically archives configuration versions created through VCS when all runs are complete and then re-fetches the files for subsequent runs. | ||||||
|
||||||
_States in this stage:_ | ||||||
|
||||||
- **Fetching:** If Terraform Cloud has not yet fetched the configuration from VCS, the run will go into this state until the configuration is available. | ||||||
- **Planning:** Terraform Cloud is currently running `terraform plan`. | ||||||
- **Needs Confirmation:** `terraform plan` has finished. Runs sometimes pause in this state, depending on the workspace and organization settings. | ||||||
|
||||||
_Leaving this stage:_ | ||||||
|
||||||
- If the `terraform plan` command failed, the run skips to completion (**Plan Errored** state). | ||||||
- If a user canceled the plan by pressing the "Cancel Run" button, the run skips to completion (**Canceled** state). | ||||||
- If the plan succeeded and neither cost estimation nor Sentinel policy checks will be done, the run skips to completion (**Planned** state). | ||||||
- If Terraform Cloud encounters an error when fetching the configuration from VCS, the run does not continue (**Plan Errored** state). | ||||||
- If the `terraform plan` command failed, the run does not continue (**Plan Errored** state). | ||||||
- If a user canceled the plan by pressing the "Cancel Run" button, the run does not continue (**Canceled** state). | ||||||
- If the plan succeeded with no changes and neither cost estimation nor Sentinel policy checks will be done, Terraform Cloud considers the run complete (**Planned and Finished** state). | ||||||
- If the plan succeeded and requires changes: | ||||||
- If cost estimation is enabled, the run proceeds automatically to the cost estimation stage. | ||||||
- If cost estimation is disabled and [Sentinel policies][] are enabled, the run proceeds automatically to the policy check stage. | ||||||
- If there are no Sentinel policies and the plan can be auto-applied, the run proceeds automatically to the apply stage. Plans can be auto-applied if the auto-apply setting is enabled on the workspace and the plan was queued by a new VCS commit or by a user with permission to apply runs. ([More about permissions.](/cloud-docs/users-teams-organizations/permissions)) | ||||||
- If there are no Sentinel policies and the plan can't be auto-applied, the run pauses in the **Needs Confirmation** state until a user with permission to apply runs takes action. ([More about permissions.](/cloud-docs/users-teams-organizations/permissions)) The run proceeds to the apply stage if they approve the apply, or skips to completion (**Discarded** state) if they reject the apply. | ||||||
- If there are no Sentinel policies and Terraform Cloud cannot auto-apply the plan, the run pauses in the **Needs Confirmation** state until a user with permission to apply runs takes action. ([More about permissions.](/cloud-docs/users-teams-organizations/permissions)) If an authorized user approves the apply, the run proceeds to the apply stage. If an authorized user rejects the apply, the run does not continue (**Discarded** state). | ||||||
|
||||||
[permissions-citation]: #intentionally-unused---keep-for-maintainers | ||||||
|
||||||
|
@@ -54,7 +58,7 @@ _States in this stage:_ | |||||
_Leaving this stage:_ | ||||||
|
||||||
- If cost estimation succeeded or errors, the run moves to the next stage. | ||||||
- If there are no policy checks or applies, the run skips to completion (**Planned (Finished)** state). | ||||||
- If there are no policy checks or applies, the run does not continue (**Planned and Finished** state). | ||||||
|
||||||
## 4. The Policy Check Stage | ||||||
|
||||||
|
@@ -72,13 +76,13 @@ _States in this stage:_ | |||||
|
||||||
_Leaving this stage:_ | ||||||
|
||||||
- If any hard-mandatory policies failed, the run skips to completion (**Plan Errored** state). | ||||||
- If any hard-mandatory policies failed, the run does not continue (**Plan Errored** state). | ||||||
- If any soft-mandatory policies failed, the run pauses in the **Policy Override** state. | ||||||
- If a user with permission to manage policy overrides, overrides the failed policy, the run proceeds to the **Policy Checked** state. ([More about permissions.](/cloud-docs/users-teams-organizations/permissions)) | ||||||
- If a user with permission to apply runs discards the run, the run skips to completion (**Discarded** state). ([More about permissions.](/cloud-docs/users-teams-organizations/permissions)) | ||||||
- If a user with permission to apply runs discards the run, the run does not continue (**Discarded** state). ([More about permissions.](/cloud-docs/users-teams-organizations/permissions)) | ||||||
- If the run reaches the **Policy Checked** state (no mandatory policies failed, or soft-mandatory policies were overridden): | ||||||
- If the plan can be auto-applied, the run proceeds automatically to the apply stage. Plans can be auto-applied if the auto-apply setting is enabled on the workspace and the plan was queued by a new VCS commit or by a user with permission to apply runs. ([More about permissions.](/cloud-docs/users-teams-organizations/permissions)) | ||||||
- If the plan can't be auto-applied, the run pauses in the **Policy Checked** state until a user with permission to apply runs takes action. ([More about permissions.](/cloud-docs/users-teams-organizations/permissions)) The run proceeds to the apply stage if they approve the apply, or skips to completion (**Discarded** state) if they reject the apply. | ||||||
- If the plan can't be auto-applied, the run pauses in the **Policy Checked** state until a user with permission to apply runs takes action. ([More about permissions.](/cloud-docs/users-teams-organizations/permissions)) The run proceeds to the apply stage if they approve the apply, or does not continue (**Discarded** state) if they reject the apply. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Huh - the second half of this is a repeat of a bullet above - do we want to remove one of them so we're not repeating ourselves? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmmm, am I looking at the right thing? The only direct repetition I see is the "More about permissions" link 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe I made that up or got confused lol - If you read the rest of the section and it's not repeated, ignore this! |
||||||
|
||||||
[permissions-citation]: #intentionally-unused---keep-for-maintainers | ||||||
|
||||||
|
@@ -103,7 +107,7 @@ A run is considered completed if it finishes applying, if any part of the run fa | |||||
_States in this stage:_ | ||||||
|
||||||
- **Applied:** The run was successfully applied. | ||||||
- **Planned:** `terraform plan`'s output already matches the current infrastructure state, so `terraform apply` doesn't need to do anything. | ||||||
- **Planned and Finished:** `terraform plan`'s output already matches the current infrastructure state, so `terraform apply` doesn't need to do anything. | ||||||
- **Apply Errored:** The `terraform apply` command failed, possibly due to a missing or misconfigured provider or an illegal operation on a provider. | ||||||
- **Plan Errored:** The `terraform plan` command failed (usually requiring fixes to variables or code), or a hard-mandatory Sentinel policy failed. The run cannot be applied. | ||||||
- **Discarded:** A user chose not to continue this run. | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something we want to add a version note on for when this is actually available for enterprise side folks? e.g., like is done here for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I added it in the changelog but totally forgot to add it here 😆