Hi there,
I have been trying to make a decision on how to restructure a Terragrunt repository I have inherited. I want to simplifly and make things more resilient. I think moving Terraform Cloud will help but I have not used it extensively so far. I have been using the CLI workflow for years and I am now considering to introduce CD with Github Actions.
I can’t make my mind up on the number of repositories. In a CLI driven workflow, I always went for:
- 1 repo per team (a team having it’s dedicated backend) for all stacks it manages (can be hundreds)
- 1 repo per module with module version pinning in the stacks repo
In a VCS/API driven workflow, all the documentation/example that I have seen do have a single repo per stack. I find this has quite a lot of overhead and not necessarily easy to maintain at scale (duplicate the .github/workflow and other top level dot files once per stack=repo). And it feels like its going to be lots of clone/commits for some simple changes.
If you went to 1 stack per repo route, are you happy with your setup? How many stacks do you manage and how hard do you find it?
If you went for many stacks per repo route, I would love you to share some wisdom/experience. I am interested in how did you do it (logic in the runner? in the workflow? both?) and how you manage your CD limitations (triggering lots of job potentially per commit with change files filters).
Kind regards,
Matthieu