How do you set up drift detection in CI?
IntermediateProductionCI/CD and Automation
Answer
A scheduled workflow runs terraform plan -detailed-exitcode -lock=false for each stack. Exit 2 opens a ticket or posts to Slack with the plan summary; exit 1 pages the owner. -lock=false avoids blocking real applies, and a read-only role is enough. HCP Terraform's health assessments or Spacelift's drift detection do the same without writing the pipeline.
More on CI/CD and Automation
Why run Terraform from a pipeline instead of laptops?BeginnerWhat stages does a good Terraform pull-request pipeline have?BeginnerHow do you make sure the apply runs exactly what was reviewed?IntermediateHow do you serialize applies to the same stack in CI?AdvancedShow a minimal GitHub Actions workflow for plan on PR.BeginnerHow does OIDC authentication from GitHub Actions to AWS work?Intermediate