Closed pzduniak closed 1 year ago
Have this same issue. Trying to debug something related to remote_state and the terraform command it provides does not run. Also, I have inputs set but those are not shown in the output to replicate as a comprehensive terraform command.
Fix released in https://github.com/gruntwork-io/terragrunt/releases/tag/v0.51.3
Here's the repro:
Root terragrunt.hcl (pointed against Oracle's S3-compatible API) contains:
Deployment's terragrunt.hcl contains:
Without the "source" block and a main.tf in the directory, it's all alright and I can run
terragrunt init
, which correctly reads the credentials from the path. However if not using the current working directory (ie. specifying theterraform.source
arg), the shared_credentials_file doesn't work (defaults to whatever's in~/.aws/credentials
). So naturally the next step is to debug it...This is not a valid Terraform command, which is the first issue:
So my suspicion is that... it's actually using chdir? Assuming that also changes the working directory, that would explain why it's failing to look up the file - a
../../../secrets/terraform/aws_credentials
points at/base/deployments/dev
, rather than/
.I'm super disappointed that this is broken this way. I expected a bit more from a solution that claims to support this particular use case.
FWIW this is also broken with backend managed through flags. Probably for the same reason.