Home / Companies / Pulumi / Blog / Post Details
Content Deep Dive

New in Pulumi IaC: `replacementTrigger` Resource Option

Blog post from Pulumi

Post Details
Company
Date Published
Author
Tom Harding
Word Count
703
Language
English
Hacker News Points
-
Summary

Pulumi Infrastructure as Code (IaC) offers a declarative interface for managing updates, calculating the differences between current and proposed infrastructures to deploy only necessary changes. While this minimizes unnecessary work, Pulumi has introduced features like the replaceWith option and replacement triggers for more granular control. Replacement triggers allow users to specify conditions under which resources should be replaced, even if no other changes have occurred, by attaching metadata to resources. This is particularly useful for scenarios like cycling private keys monthly or replacing resources when an external version number changes. By representing conditions as date strings, Pulumi can automate replacements, reducing manual intervention and minimizing errors. This feature, supported across all Pulumi SDKs from version 3.215.0, simplifies complex maintenance tasks and enhances infrastructure management efficiency.