Is there a way I can ignore an entire resource usi...
# general
c
Is there a way I can ignore an entire resource using pulumi.IgnoreChanges instead of ignoring fields ? I am using golang
g
c
@glamorous-father-12267 Yes, I already mentioned “pulumi.IgnoreChanges” I’m asking is there a way I can ignore the entire resource instead of fields. Does “root” do that ? I was facing an issue in pagerduty provider, where when I ignored a field, it gave an error that this is a required field. What I want is , that I create it one time and then never change it in the future ever again
g
interesting 🙂 and apologies I might have over read the ignorechanges part. I will be keen to know more about the use-case. Any specific reason why u want to freeze the changes for future?
c
@glamorous-father-12267 There are usescases where the components are primarily managed by external actors. For example - Pagerduty — it is much easier & faster to make manual changes from the Pagerduty console itself. Currently there is one bug in pagerduty provider which is not letting me ignore a couple of the fields. I want to create via pulumi as it is faster to create one time at the start, but I don’t want to manage via pulumi.
g
Thanks for explaining. Although the reason we use IaC so that we can manage all the changes via Code but you have a specific use-case. I have never used Pulumi to create pagerduty, but I guess similar concept of state file applies to it. Assuming you have other resources as part of the same stack which you still want to be managed by Pulumi If I was you I would try to: • Hack into the state file, remove any references for that resource from that stack, • Create a new stack which only has that particular resource and import (the resource which was exported in the last step) as part of the stack. New stack wont have any other resources apart from the one which u imported. As a result, you wont be updating the stack. So, in case even if you make changes via console, it wont effect the stack as you wont be updating it
c
Got it, makes sense. For now I had removed from stack and removed from pulumi code as well. Thanks.
g
cheers bro