to limit the destroy operation to only those resources targetted.
l
little-cartoon-10569
08/09/2022, 8:59 PM
Or comment out the code! Feature flags are a good option too.
w
wet-fall-57893
08/09/2022, 11:18 PM
thanks for the suggestions guys. Commenting code out is what I am doing atm. The problem is our codebase is not organised by provider e.g all resources go under
/aws
dir and are exposed via an entry file like
index.ts
. But anyway it sounds like it’s not that simply to be implemented. I will re-order them for now.
e
echoing-dinner-19531
08/10/2022, 8:27 AM
You could try doing some shell magic to get the list of resources.
pulumi stack export
will give a json dump of the whole state, which you could run through a tool like
jq
to grab out all the resource URNs and grep for the ones with "::aws" in them for example.
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.