https://pulumi.com logo
Title
m

mammoth-airline-91759

12/31/2021, 6:13 AM
Is there a way to make Pulumi create a resource initially, but then ignore state differences thereafter? For example, I deploy a Helm Chart into Kubernetes which has some mutating webhooks. If those modify the existing resources, Pulumi tries to update them during the next apply. I’d rather just tell it to ignore those completely, since likely I’ll never need Pulumi to update them…
c

colossal-boots-62227

12/31/2021, 6:43 AM
m

mammoth-airline-91759

12/31/2021, 9:29 PM
Thanks. I was looking at that, but it seemed like you had to target specific properties to ignore, so I wasn’t sure how to fit it to this case. Is there a way to use a wildcard or something to “ignore everything”?
For anyone with similar questions, I used the
transformations
option to check if
args.name
and/or
args.type
were the ones I was looking for and then returned updated args with
ignoreChanges: ['<prop>']
based on what the output of
pulumi preview
showed as changes (that I wanted to ignore)
c

colossal-boots-62227

01/03/2022, 1:59 AM
I haven’t tried, but I wonder if you can just do something akin to
opts=pulumi.ResourceOptions(ignore_changes=aws.xxx.WhateverResource.__dict__.keys())
to blanket ignore all properties for a given resource (for Python at least)