<p>Is there a recommended pattern or solution for keeping the definitions of individual Terraform services in their respective code repositories while still being able to update the entire project's infrastructure at once?</p>
<p>We're migrating to GCP from a managed service and already use Github+Actions.</p>
<p>I was thinking of doing this a couple different ways, either through private Terraform Modules on GCS or using git submodules.</p>
<p>While we could use a single central repository for all Terraform files, I would prefer that service definitions live in their respective repositories so as to avoid mistakes and not have future contributors overlook modifying service definitions where appropriate.</p>

crockpotveggies
<p>Take a look at <strong>Terragrunt</strong>: <a href="https://terragrunt.gruntwork.io/" rel="nofollow noreferrer">https://terragrunt.gruntwork.io/</a></p>
<p>When declaring a <code>terraform</code> block, a <code>source</code> arg can be a link to a different git repo <a href="https://terragrunt.gruntwork.io/docs/features/keep-your-terraform-code-dry/#remote-terraform-configurations" rel="nofollow noreferrer">https://terragrunt.gruntwork.io/docs/features/keep-your-terraform-code-dry/#remote-terraform-configurations</a></p>
<p>To update the entire project at once, there's <code>terragrunt plan-all</code>, <code>terragrunt apply-all</code>, and very handy <code>terragrunt graph-dependencies</code>.</p>
<p>Gruntwork (the org that built this) has a set of free modules <a href="https://github.com/gruntwork-io/" rel="nofollow noreferrer">https://github.com/gruntwork-io/</a>, a set of paid modules (monthly subscription), and of course, you can use your own modules.</p>
