Core Terragrunt Functions
Use
run_cmd with caution. Executing shell commands can expose sensitive information or introduce security risks. Always validate inputs and avoid hardcoding credentials.
Combining Terragrunt with Terraform Functions
Terragrunt functions become even more powerful when combined with Terraform’s native functions. For example, to extract just the directory name of your current Terragrunt configuration, you can use Terraform’sbasename together with get_terragrunt_dir:
Links and References
- Terragrunt Documentation: https://terragrunt.gruntwork.io/docs/
- Terraform Language Functions: https://developer.hashicorp.com/terraform/language/functions
- Terragrunt GitHub Repository: https://github.com/gruntwork-io/terragrunt
- Best Practices for Infrastructure as Code: https://www.hashicorp.com/resources/series/infrastructure-as-code-guide