Company
Date Published
Author
Ian Wahbe
Word count
760
Language
English
Hacker News points
None

Summary

Pulumi operates as a desired state engine, aligning the actual state of infrastructure with a user-defined desired state by making targeted changes. However, discrepancies can arise when Pulumi's understanding of the current state becomes misaligned due to factors such as out-of-band changes—where resources are modified outside Pulumi's control—and interruptions during operations. To address these issues, Pulumi provides the `pulumi refresh` command, which reconciles its state with the actual state of resources by checking with underlying providers like AWS. While the tool can automatically resolve most discrepancies for managed resources, it requires user input for pending CREATE operations, guiding users to either import existing resources or clear pending states to allow recreation. Additional command flags, such as `--import-pending-creates` and `--clear-pending-creates`, offer further customization to streamline these processes.