mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Add support for pre-apply task results in the cloud backend
Previously the cloud backend only supported the pre and post plan stages. This commit adds support to display the output of the new pre-apply task stage as well.
This commit is contained in:
parent
18da2f0213
commit
43371b8293
@ -133,6 +133,19 @@ func (b *Cloud) opApply(stopCtx, cancelCtx context.Context, op *backend.Operatio
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieve the run to get task stages.
|
||||
// Task Stages are calculated upfront so we only need to call this once for the run.
|
||||
taskStages, err := b.runTaskStages(stopCtx, b.client, r.ID)
|
||||
if err != nil {
|
||||
return r, err
|
||||
}
|
||||
|
||||
if stage, ok := taskStages[tfe.PreApply]; ok {
|
||||
if err := b.waitTaskStage(stopCtx, cancelCtx, op, r, stage.ID, "Pre-apply Tasks"); err != nil {
|
||||
return r, err
|
||||
}
|
||||
}
|
||||
|
||||
r, err = b.waitForRun(stopCtx, cancelCtx, op, "apply", r, w)
|
||||
if err != nil {
|
||||
return r, err
|
||||
|
Loading…
Reference in New Issue
Block a user