Setup your AWS environment
By the end of this guide, you'll have a complete AWS environment running on the Golden Path all starting from an empty AWS account.
The guide is structured as 11 step-by-step pages across 5 sections (Terraform, Networking, Database, Application, CI/CD). Each page is self-contained, so you can pause between steps and pick up where you left off.
This guide starts from scratch
This guide is a zero to hero setup guide, and has steps for most things Golden Path. Follow this for a fresh setup where there is no infra present. Looking for individual guides, like setting up backup? Navigate to Backup and read it's setup guide.
Before you begin
This guide assumes:
- You have installed the tools described in Setup tooling
- You have acquired an AWS account, and configured CLI access to the account.
AWS Usage in DIG
It is important that you have read and understood the RFC-0005 Bruk av AWS i Origo (AWS usage in Origo) document before you start setting up your infrastructure. This RFC describes the regulations for protecting user data to avoid the transfer of personal data to 3rd party countries in accordance with GDPR.
Guide overview
| Guide | Description | Time |
|---|---|---|
| Setup GitHub repository | Clickops a GitHub repository | 15 minutes |
| Initialize environment | Create common configuration | 10 minutes |
| Remote state | Set up and initialize remote Terraform state | 10 minutes |
| DNS | Set up DNS for your environment's subdomain | 10 minutes |
| Networking | Set up the shared VPC for the environment | 10 minutes |
| Load balancing | Set up a public load balancer for internet traffic | 10 minutes |
| Databases | Set up the shared database cluster | 15 minutes |
| GitHub OIDC | Let GitHub Actions assume AWS roles via OIDC | 10 minutes |
| Application common | Set up shared app infrastructure (ECS cluster, ECR) | 10 minutes |
| CI/CD common | Install the cicd-common stack for Terraform workflows | 10 minutes |
| Terraform workflows | Add workflows for Terraform plan and apply | 15 minutes |