How do you run only the stacks affected by a change in a monorepo?
AdvancedProductionCI/CD and Automation
Answer
Compute changed directories from git diff --name-only origin/main, map them to stacks (plus stacks depending on changed modules) and feed them to a job matrix. Tools: GitHub path filters, Atlantis when_modified, Terragrunt --terragrunt-modules-that-include, Spacelift or env0 stack triggers. Always include a full nightly plan so missed dependencies surface.
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