This message was deleted.
# general
s
This message was deleted.
โœ… 1
g
During the preview stage it refreshes the state So the diff is not against the last deployed state but the last known state, the one acquired during the preview
Manual changes on resources managed by Pulumi will be reverted if not also changed on the code
You can tell Pulumi to ignore some fields when calculating the diff, but those fields will still be overwritten when some other field change
h
Manual changes are kind of a no-no when doing Infrastructure as Code ๐Ÿ˜‰
๐Ÿ™ 3
g
You can also tell Pulumi to not refresh the state, it's not recommended, but you can. That will still overwrite your manual changes once you change any other field on the Pulumi resource, since it will reapply it all
f
Avoid manual changes ๐Ÿ™‚
๐Ÿ™ 3
g
And that can also break you deployment since some resources on Pulumi maps to more than one resource on the target. Don't know specifics of AWS and Azure, but on GCP for example you don't send your new DNS records, you send the diff as delete and insert operations. If you don't know the current state your diff will be invalid
๐Ÿ’ฏ 2
r
Wow, thank you all so much for the clear and fast answers! I definitely want to encourage IaC in our startup and therefore I guess itโ€™s just a good โ€œpunishmentโ€ if people were to manually make changes.
m
When you do, they will never go back
๐Ÿ˜‚ 1
g
Just to clarify, Pulumi does not automatically refresh the state during a
preview
or
up
. You can instruct Pulumi to do this using the
--refresh
flag, but it does not do it by default.
g
True, Terraform is opt-out of refreshing before planning, Pulumi is opt-in. Sorry
๐Ÿ‘ 1
r
Thanks for the clarifications! ๐Ÿ™‚