I'm looking for a solution to replicate my terraform repositories structure that is always identical
- config (dev/stg/prod - backend.tf + input.tfvars)
- tests/
- main.tf / variables.tf / outputs.tf
- Jenkinsfile / version / CHANGELOG / README / CONTRIBUTING
I'm looking for a solution to reproduce this structure over new repositories by running a command line such as cookiecutter for Python code, for example.
My goal is to avoid copy/paste from one repo to another, and reuse as much as I can a base already coded (having something good from a DevOps perspective) I dont think cookie cutter supports terraform scripts and I dont know any other potential solution to reproduce terraform repos.
Check out Terraspace. It builds Terraform projects to achieve DRY.
Here's a also blog article on it: Introducing Terraspace: The Terraform Framework