Prompt
Why is my CI/CD pipeline failing on infrastructure apply?
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
I can help, but I’ll need a bit more detail to pinpoint the cause.
Please paste any of the following:
- The exact error output from the
applystep - The CI/CD config for that job/stage
- e.g. GitHub Actions, GitLab CI, Jenkins, Azure DevOps, etc.
- The IaC tool and version
- Terraform / OpenTofu / Pulumi / CloudFormation / Ansible, etc.
- What changed recently
- code, variables, backend, provider version, state, permissions, network, secrets
- Whether plan succeeds but apply fails, or both fail
- Any relevant logs around the failure
- especially auth, state lock, provider, quota, or resource creation errors
Common reasons CI/CD fails during infrastructure apply:
- Authentication/permissions issues
- missing cloud credentials, expired tokens, insufficient IAM/RBAC
- State lock problems
- another run holding the lock, stale lock, backend access issue
- Provider/API errors
- rate limits, service outages, invalid resource arguments, quota exceeded
- Environment differences
- CI runner lacks variables, secrets, modules, or network access
- Drift or unexpected changes
- plan was generated against one state, apply runs later against a changed state
- Version mismatch
- different Terraform/provider versions between plan and apply
- Approval/manual gate issues
- apply blocked by policy checks or missing environment approval
- Destroyed or renamed resources
- dependencies no longer exist, causing apply to fail
If you want, paste the apply log and I can tell you the likely root cause and how to fix it.