Split up yaml and terraform into service repos #49
Answered
by
milldr
nitrocode
asked this question in
Free Tier Support
-
Is there a good doc on how to split up terraform from a mono repo to both a mono repo and service repos so it may be possible to collocate infra and its service code ? E.g. aws account map and account and root components live in mono repo, core shared components like s3-bucket and others are in mono repo, but service repos can contain yaml stacks and even custom non shared terraform components |
Beta Was this translation helpful? Give feedback.
Answered by
milldr
Mar 26, 2025
Replies: 1 comment 3 replies
-
@milldr helped someone else with this recently. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes we helped a customer with this recently, but we don't have official docs on it yet. Here's a high level summary, and we can add a task to convert this into an official doc page.
Poly-Repo Strategy with
account-map
Problem
You want many repositories to deploy infrastructure as code with Terraform and Atmos. However, the standard
providers.tf
configuration with Cloud Posse components requiresaccount-map
to dynamically select Terraform roles and target accounts.Solution
1 - Use the
infrastructure
Repo for core servicesinfrastructure
repository to deploy all accounts, Terraform state, and core servicesaccount-map
hereaccount-map
Terraform output t…