During a technical review of an enterprise CI/CD pipeline, an organization discovers that manual configuration edits made directly in the Google Cloud Console are frequently causing deployment pipeline failures during Terraform runs. Which operational practice should the team integrate into their continuous integration pipeline to detect and analyze configuration drift before applying changes?
- Automate execution of infrastructure plan validation checks (such as running terraform plan) within the CI pipeline to compare current real-world state against desired state definitions.Answer
- BGrant developers the primitive Owner role on the Google Cloud project so they can directly overwrite state discrepancies when pipeline errors occur.
- CStore the infrastructure state file directly inside the transient CI build runner's local container directory instead of a shared remote backend.
- DRely strictly on VPC Service Controls perimeters to prevent developers from making administrative configuration changes to cloud resources.
Answer
Automate execution of infrastructure plan validation checks (such as running terraform plan) within the CI pipeline to compare current real-world state against desired state definitions.
Automating plan validation runs within the CI pipeline enables continuous detection of configuration drift by comparing the actual live cloud infrastructure state against the target definitions declared in version control.
Step-by-Step Solution
Key Concept
Configuration Drift Detection in CI/CD Pipelines