Hello,
I am really new to terraform but I am already loving due to its awesome and what it can help achieve. I would like to know how best I can organise my terraform repo to allow developers in my organisation to simply open a PR when there needs a github repository to be created for them and once that PR is merged the given repo(s) is created for them. For now I have an dumb way to do this which is to have a map and let them add the repos they want like this:
However I would like to have a folder containing each repo file and then terraform can build this map automatically from that folder. That way developers don’t have to edit that file because that file .tfvars file.
The solution I have in mind is to create either a folder containing either json or a yaml file for each repo and then read that folder to build that map. However I have tried but not successful.
so I have JSON files for each repo under the files folder, and read all files and combine them into one large list. Then you could iterate through this list from one shared resource using for_each, for example.