Repository navigation
feat(deploy): wait for approval before applying live - #58
Merged
Merged
Conversation
The live apply ran straight after the plan, with only the destructive-change check in between. live-plan now writes the planned changes and the full plan to the run summary, and the apply job, which already runs in the Live environment, waits for that environment's required reviewer before applying the saved plan. A plan without changes skips the apply.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The live apply ran straight after the plan, gated only by the destructive-change check, so a wrong plan had to be caught and the run cancelled in time. This adds a review step between plan and apply.
What changed
live-plansummarises the plan in the run summary: add/change/destroy counts, one line per changed resource, and the fullterraform showfolded below. Sensitive values stay(sensitive value).live-applywaits for approval on theLiveenvironment, then applies the saved plan artifact, so what gets approved is exactly what gets applied.has_changesjob output), so a no-op run does not sit waiting for approval.AGENTS.mddescribes the approval step.Environment setting (already applied)
Livenow hasmortikas required reviewer (self-review allowed, since the same person dispatches) and deploys from protected branches only.Live PlanandStageare unchanged. Set via the API rather than in code; it is in effect for the current workflow too.Verification
has_changes=true,## Live plan: 4 to add, 3 to change, 0 to destroy(matching Terraform's own count), the seven resources listed, full plan folded; only(sensitive value)/(write-only attribute)where the 1Password item and zone passwords appear.has_changes=false,0 to add, 0 to change, 0 to destroy.actionlintclean.🤖