Managing state files in Terraform is notoriously difficult, requiring external buckets and DynamoDB locks. Pulumi solves this out-of-the-box using the Pulumi Service. In this episode, we explore how State is managed, and how to use Stacks to deploy identical infrastructure to Staging and Production environments safely.
Refactoring HCL code is dangerous. If you rename a resource block, Terraform will attempt to destroy the old resource and recreate it. In this episode, we learn how to use ‘moved’ blocks and the state CLI to refactor code safely, preventing catastrophic database deletions.
An exhaustive guide to Discriminated Unions in TypeScript. Learn why optional property blobs create impossible states, the 3 requirements for tagged unions, how Control Flow Analysis narrows discriminants, and real-world domain state patterns.
Local state files are fine for solo learning, but catastrophic for team environments. In this episode, we will solve the ‘state file drift’ problem by configuring a Remote Backend on AWS S3, and preventing simultaneous executions using DynamoDB locking.