How to Investigate Divergence Errors
The divergence pipelines alert us if the state of the cluster does not match the source code in our git repositories.
Usually, the pipeline failure will include the terraform plan output that explains exactly what has diverged.
Reproduce the plan
To run the same terraform plan command as the pipeline does:
- Ensure you have the following environment variables set:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEY
- Start in a working copy of the cloud-platform-infrastructure repo
cdinto the directory matching the pipeline which is failing:
| Pipeline | Directory |
|---|---|
| divergence-kops | terraform/cloud-platform |
| divergence-k8s-components | terraform/cloud-platform-components |
| divergence-eks | terraform/cloud-platform-eks |
| divergence-eks-core | terraform/cloud-platform-eks/core |
| divergence-eks-components | terraform/cloud-platform-eks/core/components |
| divergence-networking | terraform/cloud-platform-network |
- Check you’re using the correct terraform workspace (e.g.
terraform workspace select live) - Check you’re targeting the correct kubernetes cluster, by running
kubectl cluster-info - Run the terraform plan
terraform init
terraform plan
You should see the same differences as reported in the divergence pipeline.
This page was last reviewed on 12 August 2025.
It needs to be reviewed again on 12 February 2026
by the page owner #cloud-platform
.
This page was set to be reviewed before 12 February 2026
by the page owner #cloud-platform.
This might mean the content is out of date.