Closed hunkeelin closed 2 years ago
You need to escape with ${}
so that it is treated as a terragrunt interpolation:
generate "provider" {
path = "provider.tf"
if_exists = "overwrite"
contents = <<EOF
provider "vault" {
address = "vault.test"
skip_tls_verify = true
}
provider "postgresql" {
host = "${dependency.database.outputs.endpoint}"
port = 5432
database = "postgres"
username = "${dependency.database.outputs.username}"
password = "${dependency.database.outputs.password}"
connect_timeout = 15
sslmode = "disable"
}
EOF
}
My directory at the moment
terragrunt.hcl
Then in my
vault/terragrunt.hcl
I have the following:When I run
terragrunt run-all plan
The terragrunt.hcl on the root directory ran fine but the one from vault/terragrunt.hcl gave me the following error:
Why I am unable to reference the module?