Skip to content

feat(deploy): wait for approval before applying live - #58

Merged
mortik merged 1 commit into
mainfrom
feat/gated-live-apply
Nov 17, 2026
Merged

mortik merged 1 commit into
mainfrom
feat/gated-live-apply

Conversation

@mortik

@mortik mortik commented Nov 17, 2026

Copy link
Copy Markdown
Member

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-plan summarises the plan in the run summary: add/change/destroy counts, one line per changed resource, and the full terraform show folded below. Sensitive values stay (sensitive value).
  • live-apply waits for approval on the Live environment, then applies the saved plan artifact, so what gets approved is exactly what gets applied.
  • A plan without changes skips the apply (has_changes job output), so a no-op run does not sit waiting for approval.
  • AGENTS.md describes the approval step.

Environment setting (already applied)

Live now has mortik as required reviewer (self-review allowed, since the same person dispatches) and deploys from protected branches only. Live Plan and Stage are unchanged. Set via the API rather than in code; it is in effect for the current workflow too.

Verification

  • The summary step run locally against a real saved plan:
    • live: 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.
    • stage (no changes): has_changes=false, 0 to add, 0 to change, 0 to destroy.
  • actionlint clean.

🤖

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.
@mortik mortik self-assigned this Nov 17, 2026
@mortik
mortik added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit f7a7440 Nov 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant