I was following this tutorial for multi-env deployment with Terragrunt in GCP: https://harjot.me/blog/deploying-docker-containers-to-gke-using-terraform/
As you can see he didn't finish the gcp-sql moudule example and now I don't know how do I refer to other resources or outputs that are in a different folders using this template. For instance :
a module in terraform>module>gcp-sql>main.tf
needs a value from terraform>module>gcp-gke>main.tf
such as module.gcp_services.project_id
or
it needs a value from terraform>module>gcp-gke>outputs.tf
such as module.gke.cluster_endpoint
(I'm not even sure this is the correct way to refer to the output, do I really need to specify module name "gke"?)
So in short,using this template from tutorial if a module that is using a value from another module but both modules are in the same main.tf such as erraform>module>gcp-gke>main.tf
file then yes I can use module.gcp_services.project_id
but will the same apply if the second moudule is in a different main.tf file. If yes, how is it aware of the other module? And again, how do I use outputs?