Skip to content

Instantly share code, notes, and snippets.

@nvnivs
Created April 19, 2025 06:12
Show Gist options
  • Save nvnivs/842d2b919e325d2679d4c7348a6449e5 to your computer and use it in GitHub Desktop.
Save nvnivs/842d2b919e325d2679d4c7348a6449e5 to your computer and use it in GitHub Desktop.
Echos path related Terragrunt built-in functions
locals {
path_functions_command = <<EOF
echo 'path_relative_to_include: ${path_relative_to_include()}';
echo 'path_relative_from_include: ${path_relative_from_include()}';
echo 'get_repo_root: ${get_repo_root()}';
echo 'get_terragrunt_dir: ${get_terragrunt_dir()}';
echo 'get_working_dir: ${get_working_dir()}';
echo 'get_parent_terragrunt_dir: ${get_parent_terragrunt_dir()}';
echo 'get_original_terragrunt_dir: ${get_original_terragrunt_dir()}';
EOF
#echo 'get_path_to_repo_root: ${get_path_to_repo_root()}';
#echo 'get_path_from_repo_root: ${get_path_from_repo_root()}';
echo_path_functions_command = run_cmd("sh", "-c", local.path_functions_command)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment