# general


02/01/2024, 7:51 PM
Pet Protection desired! I've got a pulumi stack that has one EC2 instance that is a pet. For current laziness' sake I've got user data for it that does some minimal first-boot work. (Will move to a more robust option later, e.g. custom AMIs, etc.) The user data is common between multiple stacks, and occasionally I might want to do a minor update which invalidates the sha and pulumi would want to recreate the instance. Is there any pulumi way to say "once launched, ignore changes in user data, do not replace" ?
I have plenty of other workarounds I could use (e.g. updating user data across the pets outside pulumi so it's always 'up to date') but since the user data is irrelevant after first boot I would rather just ignore the change.


02/01/2024, 7:53 PM
There's a few relevant features: • The ignoreChanges opt. • The protect opt. • Rework into separate projects. The opts are documented here:
Since it's a pet resource, there's a strong argument for reworking into a separate project. Since it would (probably?) have a different lifecycle and would be udpated / deployed on different schedules, you would use a different project to manage this most easily.
But the two opts, especially in combination, will ensure that it does what you need.


02/01/2024, 7:56 PM
oh, completely agreed this isn't the most optimal solution. ignoreChanges looks perfect, will jump on it.
and then tomorrow's problem can be handled tomorrow.