This is an example of how to use Terraform AWS registry modules with Terragrunt.
source
has to be full git URL and not Terraform Registry open issue #311- File
main_providers.tf
is named so, because it will be copied to another local directory and merged with module's code. If such file exists in the module already then it will overwrite the one provided by the module.
Your terraform.tfvars file points directly at the registry module github source. Wouldn't it need to point at the directory containing the main_providers.tf file? Otherwise, I don't see how terragrunt is going to pick up the provider and backend declarations.
I'd have thought that terraform.tfvars should use a github url to MY module repo, and then main_providers.tf would include a module block which would have its own source attribute that points to the module in the terraform module registry (via github, I understand)
Also, if the main_providers.tf file has a module block, would I need to set variables in it or would those automatically be transferred from the tfvars file and passed through? Otherwise, I end up with something like this, which seems like a lot of typing.
And I assume I would have to provide variables.tf and outputs.tf, too? Or will terragrunt automatically map inputs and outputs?