Repository types
The Golden Path supports three ways to split infrastructure code and application code across GitHub repositories. Choose a repository type before you set up Terraform automation or CI/CD for a repository.
| Repository type | What the repository contains | Example | Supported |
|---|---|---|---|
| Infrastructure repository (infra) |
Only Terraform code. Often many stacks per environment. | pirates-iac |
|
| Application repository (app) |
Only application code, for one application or for many applications (application monorepo). | pirates-app-zebra, pirates-apps |
|
| Application repository with infrastructure (hybrid) |
Code and infrastructure for one application: one stack per environment, plus an optional data stack. | pirates-app-swordsmith |
|
| Infrastructure repository with application code | Application code and general infrastructure, such as networking or load balancers. | - |
Most teams have one infrastructure repository that contains their infrastructure code, or most of it, and one or more application repositories of either supported type.
Infrastructure repositories with application code
The Golden Path doesn't support the repository type infrastructure repository with application code: a repository that contains general infrastructure code and application code. Infrastructure repositories and application repositories use different automations, Terraform automation and CI/CD. These automations optimize for different things, and aren't designed to work together.
Instead, choose one of these options:
- Option A: Move the application code to a new repository. You get an infrastructure repository and an application repository.
- Option B: Move the application code and its infrastructure to a new repository. You get an infrastructure repository and an application repository with infrastructure.
If you're not sure which option fits your team, contact Utviklerflyt.