Issue with paths

I have three modules ec2, rds and a setup module … there is a dependency with the rds ip and ec2 ip
so I wait until the end and then when the setup module runs it fails to connect to the host. Although if I go to the .terragrunt folder and run terraform from there is works …

here is my tree path

in the setup module I use a ssh connection block and I should have access to
the key and the install paths.
I have a key which is in the workspace path which I use it as
/workspace/key.pem
and I use the installer path as
/workspace/files/installer/install_this.sh

I have a feeling it’s an issue with the paths ?

Hi @Buamod,

If you need to reference anything in the infrastructure-live folders to pass into the modules, you will want to use get_terragrunt_dir as a starting point for the paths. Bare relative paths are based on the terraform working directory generated by terragrunt, which are not always programmatically identifiable. Using get_terragrunt_dir ensures that you get a known, stable starting point for constructing the paths.

Yori

1 Like