Skip to content

Commit

Permalink
simplify methods to represent smaller steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Uk1288 committed Jun 14, 2023
1 parent 2e698e9 commit 368d0b3
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 153 deletions.
30 changes: 16 additions & 14 deletions tfe/resource_tfe_workspace_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ var planPendingStatuses = map[tfe.RunStatus]bool{
}

var applyPendingStatuses = map[tfe.RunStatus]bool{
tfe.RunConfirmed: true,
tfe.RunApplyQueued: true,
tfe.RunApplying: true,
tfe.RunQueuing: true,
tfe.RunFetching: true,
tfe.RunQueuingApply: true,
tfe.RunPreApplyRunning: true,
tfe.RunConfirmed: true,
tfe.RunApplyQueued: true,
tfe.RunApplying: true,
tfe.RunQueuing: true,
tfe.RunFetching: true,
tfe.RunQueuingApply: true,
tfe.RunPreApplyRunning: true,
tfe.RunPreApplyCompleted: true,
}

var applyDoneStatuses = map[tfe.RunStatus]bool{
Expand All @@ -54,15 +55,16 @@ var confirmationPendingStatuses = map[tfe.RunStatus]bool{
}

var confirmationDoneStatuses = map[tfe.RunStatus]bool{
tfe.RunConfirmed: true,
tfe.RunApplyQueued: true,
tfe.RunApplying: true,
tfe.RunPrePlanCompleted: true,
tfe.RunPrePlanRunning: true,
tfe.RunQueuingApply: true,
tfe.RunConfirmed: true,
tfe.RunApplyQueued: true,
tfe.RunApplying: true,
tfe.RunPrePlanCompleted: true,
tfe.RunPrePlanRunning: true,
tfe.RunQueuingApply: true,
tfe.RunPreApplyCompleted: true,
}

var policyOverridenStatuses = map[tfe.RunStatus]bool{
var policyOverriddenStatuses = map[tfe.RunStatus]bool{
tfe.RunPolicyChecked: true,
tfe.RunConfirmed: true,
tfe.RunApplyQueued: true,
Expand Down
Loading

0 comments on commit 368d0b3

Please sign in to comment.