feat: improves our pipelines for roots#66
Open
seagyn wants to merge 1 commit into
Open
Conversation
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.
Summary
Overhaul of the AWS Terraform root workflows to support automatic change detection, plan-as-artifact, PR comments, optional AI summaries, and approval-gated applies.
Changes
Removed
terraform-root-continuous-integration.yaml— replaced by the new CI workflowterraform-root-detect-changes.yaml— logic baked directly into CINew
terraform-root-ci.yaml— full PR pipeline:fmt -check,validate,tflint) only on changed rootsterraform planonly on changed rootsactions/ai-inference@v1(GitHub Models,openai/gpt-4o-mini) — opt-in withai-summary: trueUpdated
terraform-root-plan.yaml— single-root plan workflow:workflowtoroot-out=tfplan)terraform-root-apply.yaml— two-job plan → approve → apply:main, generates a saved plan, renders it in the workflow step summary, uploads as artifactenvironment(approval gate via required reviewers), downloads the saved plan, applies withterraform apply tfplanterraform-root-destroy.yaml— now includes:rootinput for specifying the target directoryenvironmentinput for GitHub environment approval gateNot changed
*-azure.yaml) — untouchedHow approval works
Approval uses GitHub's native environment protection rules. To enable:
production)environmentinput when calling the apply/destroy workflowsThe workflow will pause at the apply/destroy job and show an Approve/Reject button in the Actions UI.
How AI summaries work
Uses GitHub's
actions/ai-inference@v1action which calls GitHub Models (free tier). The plan output is sent toopenai/gpt-4o-miniwith a prompt asking for a risk assessment and change summary. Opt-in viaai-summary: true— no API keys required, just themodels: readpermission on the workflow.