Hi,
Our team has undertaken a project to refactor a large Terraform project by extracting several modules. We have opted to keep each module in its own VCS repository, so that we can build a testing Terraform project for each and implement an automated CI/CD workflow that will apply the testing Terraform project and validate the resources using various API clients (e.g. AWS SDK) in code. Much like what was suggested in this thread: Best practices of Terraform staging testing
But beyond simply carving up the large Terraform project into component sized modules, we wanted to add all ancillary resources into the module. For example, our rds module would not only have AWS RDS resources, but also DataDog resources to manage Dashboards that monitor our RDS DB instances, and possibly Vault resources to manage our database Secrets Engine.
As part of this project we are also adopting Terraform Cloud to track our Terraform state and host our private modules. However, the naming requirement for the repository (Publishing Private Modules - Private Registry - Terraform Cloud and Terraform Enterprise | Terraform by HashiCorp) is causing to doubt our approach. Specifically the necessity to specify a provider as part of the name.
We would very much appreciate any comments on our approach of using Terraform modules as a way of aggregating all resources across different providers that are related to a common component in our system, so that they can be tested as a unit.
Marc