terragrunt
terragrunt copied to clipboard
x-access-token shown in stderr if module not found in repository
Hello,
I've found out that terragrunt is printing out the token value if no module is found.
ERRO[0019] Working dir azurerm/shared/acr from source git::https://x-access-token:[email protected]/USER/REPO?ref=main does not exist
ERRO[0019] Unable to determine underlying exit code, so Terragrunt will exit with error code 1
Terragrunt version v0.38.12
Below my terragrunt.hcl file:
include {
path = find_in_parent_folders()
}
dependencies {
paths = ["../rg"]
}
dependency "rg" {
config_path = "../rg"
mock_outputs = {
resource_group_name = join("-", ["rg", local.common_vars.prefix])
}
mock_outputs_allowed_terraform_commands = ["validate", "plan"]
}
locals {
common_vars = yamldecode(try(file("common_vars.yaml"), file(find_in_parent_folders("common_vars.yaml"))))
secrets_git_tmp = run_cmd("--terragrunt-quiet", "bash", "${get_path_to_repo_root()}/__scripts__/generate-access-token.sh", "-a", "print")
}
terraform {
source = "git::https://x-access-token:${local.secrets_git_tmp}@github.com/USER/REPO//azurerm/shared/acr?ref=main"
}
inputs = {
is_test = true
sku = "Basic"
}