Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsIf an LLM step ran after a Terraform change was rejected, the cause is in the workflow’s control flow—not something the title alone can identify. First locate the LLM call: is it a later step in the Terraform job, a separate job, or another workflow triggered independently? Then inspect that path’s failure handling and conditions. In GitHub Actions, steps normally stop after a failure, and dependent jobs normally skip, but explicit conditions and error-handling settings can change that behavior.
First establish what “rejected” means
A rejected Terraform change could mean a command returned a nonzero exit code, a policy check denied the run, or a workflow paused for human approval. These are different outcomes and may not be represented by the same step result. Terraform’s configuration language includes preconditions and postconditions: a failed precondition stops the current operation, while a failed postcondition halts downstream processing that depends on the resource. HashiCorp documents these validation behaviors.
As an Amazon Associate I earn from qualifying purchases.
HCP Terraform policy enforcement also has enforcement levels, and some violations can be overridden by users with the required permissions. A policy rejection therefore does not automatically prove that a GitHub Actions job failed. Check which check produced the rejection and what result it returned. HashiCorp’s Terraform policy documentation explains the enforcement context.
Free tools Windows power users keep installed
One-click scans. No signup required.
Locate where the LLM call runs
The right place to investigate depends on the workflow structure. GitHub defines a job as steps running on the same runner; separate jobs require dependencies to establish sequencing. The workflow YAML and run logs show whether the LLM invocation belongs to the Terraform job, a dependent job, a reusable workflow, or a separately triggered workflow. GitHub’s jobs documentation describes job dependencies.
#1 Best Overall
| LLM location | What to inspect | Why it matters |
|---|---|---|
| Later step in the Terraform job | The preceding Terraform step’s outcome, its continue-on-error setting, and the LLM step’s if condition |
Step-level error handling or a custom condition can allow later steps to run. |
| Separate job in the same workflow | The LLM job’s needs list and complete job-level if condition |
A dependency normally gates the job, but a condition can explicitly permit it to continue after a failed prerequisite. |
| Reusable or independently triggered workflow | The caller, trigger event, inputs, and any passed gate result | A workflow triggered separately may not be downstream of the Terraform job at all. |
Check failure handling inside a job
For a same-job LLM step, search the workflow for continue-on-error, if: always(), and conditions referencing a Terraform step’s outcome or conclusion. A step configured with continue-on-error can fail without stopping the job, allowing later steps to execute. The HashiCorp setup-terraform action documentation includes an example that uses this setting on Terraform format and plan steps to collect and report outcomes. That example illustrates a possible workflow pattern; it does not establish what happened in any particular run.
When the action wrapper is enabled, setup-terraform exposes command output and an exit-code output. Use the actual command result to create an explicit pass/fail decision before the LLM step; do not treat a green enclosing job as proof that every Terraform step passed. See the action’s documentation for its outputs and usage: hashicorp/setup-terraform.
Check dependencies and job conditions
For a separate LLM job, confirm the Terraform gate is named in needs. GitHub says, “If a job fails or is skipped, all jobs that need it are skipped unless the jobs use a conditional expression that causes the job to continue.” The key exception is an explicit condition that changes the default behavior. GitHub Docs: Using jobs in a workflow.
Recommended Free Tools
Review the full condition, not just the dependency. GitHub’s expression reference describes the default success() status check and the effects of status-check functions such as failure() and always(). In particular, always() is true even when a workflow is canceled, so it is generally unsuitable as the sole condition for a costly or consequential LLM task that must not run after a failed gate. !cancelled() may suit work intended to continue unless canceled, but it does not itself require a successful Terraform gate. GitHub’s expression reference documents these conditions.
Rank #3
A separate LLM job can explicitly require the gate’s successful result:
llm_review:
needs: terraform_gate
if: ${{ needs.terraform_gate.result == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Run LLM review
run: ./invoke-llm-review.sh
Replace terraform_gate with the actual job ID and make sure its result represents the gate decision you care about. Check the full condition for additional logic that could bypass the intended guard. If the LLM call is a step in the same job, gate that step on the Terraform step’s success or on an explicitly validated output instead.
Trace the run to confirm the cause
- Open the workflow revision used by the run. Confirm the YAML being evaluated is the revision you expect, rather than relying on a newer edit.
- Inspect the Terraform gate result. Check the command’s exit code, step outcome, and any policy or approval result. GitHub documents how action exit codes determine success or failure in Setting exit codes for actions.
- Follow the LLM execution path. For a step, inspect its preceding steps and conditions; for a job, inspect its
needsand job-levelif. If a different workflow invoked it, identify the triggering event and data passed to it. - Read the condition-evaluation logs. GitHub’s troubleshooting guidance explains how to find expanded conditions and determine why a job ran or was skipped. Look for the expression being evaluated and its result, not only the final job status. GitHub Docs: Troubleshooting workflows.
Make the gate’s result explicit
A robust design gives the Terraform gate a clear pass/fail contract and makes the LLM invocation depend on that result. If a gate step intentionally uses continue-on-error to collect diagnostics, translate its outcome into a validated output or decision before any LLM call. For separate jobs, declare the dependency and require its successful result; for steps in the same job, use a success condition tied to the gate. Keep reporting or cleanup logic that should run after failure separate from the LLM invocation condition.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
HashiCorp’s GitHub Actions Terraform tutorial and automation guide provide context for Terraform orchestration. The crucial diagnosis, however, comes from the actual workflow definition and that run’s evaluated conditions: do not assume a missing dependency, always(), or continue-on-error caused the behavior until the evidence shows it.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




