alphagov / consent-api

Service for sharing user consent to cookies across multiple domains
https://consent-api-bgzqvpmbyq-nw.a.run.app
MIT License
8 stars 0 forks source link

refactor(infra): get rid of nested stacks #226

Closed guilhem-fry closed 8 months ago

guilhem-fry commented 8 months ago

IaC Setup Overhaul in Pulumi

Context

The PR addresses issues in our existing Infrastructure as Code (IaC) setup using Pulumi. Previously, our setup involved multiple stacks for each environment (dev, staging, and production) and branch, leading to confusion and challenges in resource management. This also resulted in IAM inconsistencies across stacks.

Solution

This PR eliminates the concept of environment stacks, consolidating infrastructure management into a single stack per environment. It involves significant changes, including:

Developer Environments

New Stack Management Approach

Stack Environment
production Production
staging Staging
staging-- Staging
development Development
development--<developer's name> Development

Key Points

Notes

guilhem-fry commented 8 months ago

This is a major improvement, thanks.

Something to bear in mind for the documentation is that I found the relationship between the production environment and the production stack to be a bit confusing. In various places, the code checks that the name of the stack is "production" but doesn't check the name of the environment. It would help to know what things are governed by the environment vs the stack.

All good to merge, though.

Thanks Duncan, I'll keep this in mind