Updated CLI args, config attributes and blocks
--feature
feature
What's Changed
- Added new HCL block and CLI options for feature flags to modify Terragrunt code evaluation
Related links
Example flags usage:
# terragrunt.hcl
feature "run_hook" {
default = false
}
terraform {
before_hook "feature_flag" {
commands = ["apply", "plan", "destroy"]
execute = feature.run_hook.value ? ["sh", "-c", "feature_flag_script.sh"] : [ "sh", "-c", "exit", "0" ]
}
}
Passing feature flags:
terragrunt --feature run_hook=true apply
terragrunt --feature run_hook=true --feature string_flag=dev apply
Full Changelog: v0.68.7...v0.68.8-beta2024110601