When starting a new project, what are the first things you consider when structuring the directory?
In my case, I’m coming to a new company and have been handed a terraform project. We setup clients with their own infrastructure to run our software (some share but let’s assume all get their own for simplicity). So varying infrastructures with one software. I want to allow for future scalability and integration with other automation tools (ansible/packer/Jenkins). I’m trying to figure out if I should put all the resources under one root directory and make tfvars for each client’s variables, plus a test and staging tfvars files. Any change will require to use the -var flag to redeploy that environment. Or if I should split prod and nonprod completely. In future deployments, I’d like to think about how an automated pipeline might look like as well with something like redeploying on the fly to take dev updates to a production environment which might deploy a new vm image to a new vm and slowly load balance the connections to the new vm.
What are your thoughts?