Hello everyone. I have a question for my company where I would like to restructure their code to follow a process in being DRY. Our code currently is like so:
├── README.md
├── main.tf
├── variables.tf
├── outputs.tf
├── ...
├── modules/
│ ├── networking/
│ │ ├── README.md
│ │ ├── variables.tf
│ │ ├── main.tf
│ │ ├── outputs.tf
│ ├── elasticache/
│ ├── .../
├── dev/
│ │ ├── main.tf
├──qa/
│ ├── .../
├──prod/
We have Terraform projects with tf-*
and terraform-*
which are Terraform modules. The thing that is causing issues for us is as we grow our company, we are creating a project repo every time which causes our repos to get lost in usage since they are done once and done.
Also, our Terraform modules are spread out as well when they are referenced in our Terraform projects.
In conclusion going back to my original question: What methods can I introduce to better help my structure that I currently have?
Some suggestions that I have been introduced to:
- Introduce a new method of moving towards Terragrunt and restructuring our repos?
- Combine our
tf-*
into one repo andterraform-*
into another?
Would appreciate any feedback!