Menu

📰
0

Terragrunt run-all

DEV Community: terraform·Bartłomiej Danek·about 1 month ago
#QETD6Dcj
#dev#class#code#highlight#terragrunt#photo
Reading 0:00
15s threshold

Terragrunt run-all Runs a Terraform command across all units in the current directory tree, respecting dependency order. cd environments/prod terragrunt run-all plan terragrunt run-all apply terragrunt run-all destroy # reverse order dependency-aware ordering environments/prod/ ├── vpc/ ├── rds/ # depends on vpc └── eks/ # depends on vpc run-all apply applies vpc first, then rds and eks in parallel. real CI pipeline # .github/workflows/deploy.yml - name : Plan all run : terragrunt run-all plan --terragrunt-non-interactive working-directory : environments/prod - name : Apply all run : terragrunt run-all apply --terragrunt-non-interactive -auto-approve working-directory : environments/prod if : github.ref == 'refs/heads/main' Detect drift in CI without applying: # exit code 2 = changes detected, 0 = no changes, 1 = error terragrunt run-all plan \ --terragrunt-non-interactive \ -detailed-exitcode filtering # skip a unit terragrunt run-all apply --terragrunt-exclude-dir environments/prod/rds # target a single…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More