I have some Terraform code that I use to provision Transit Gateway attachments where the Transit Gateway is in one account and the VPC is a different account.
I use the following block within my module:
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 2.7.0"
configuration_aliases = [ aws.src, aws.dst ]
}
}
}
I'm trying to convert this project into Terragrunt and I'm not sure how to accomplish this. There is mention of using generate here, but I don't know where to start.
How do I generate providers.tf file in the working directory that can be passed to Terragrunt during plan/apply?
Just create the providers, e.g.