Real-world projects have multiple environments (e.g., dev, staging, prod) to catch mistakes before they impact users, with different infrastructural settings and configurations.
Pulumi manages environments through stacks, isolated instances of Pulumi programs with their own resources and configurations.
Per-stack config files in Pulumi separate settings between environments, allowing for environment-specific configuration values without changing the code.
Using Pulumi stacks and configuration settings, developers can create different resources like storage accounts for different environments easily and maintain a structured and flexible infrastructure.