Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: pulumi destroy --target XYZ --its-okay-if-the-target-doesnt-exist #8562

Open
Tracked by #13029
wimax-grapl opened this issue Dec 8, 2021 · 2 comments
Labels
kind/enhancement Improvements or new features

Comments

@wimax-grapl
Copy link

wimax-grapl commented Dec 8, 2021

Hello!

  • Vote on this issue by adding a 馃憤 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

I have a Pulumi Stack Output that's like
stateful-resource-urns: ["urn1", "urn2"]

As a stopgap measure in our CI for testing, we basically run a
pulumi destroy --target urn1 --target urn2
followed by a pulumi update to get a fresh version of these stateful resources.

I recently ran into an issue where, due to AWS IAM issues, urn2 was not deletable, and now I'm in a state where

pulumi destroy --target urn1 --target urn2
# urn1 deleted; urn2 not deleted due to IAM issue

< fix IAM issue>

pulumi destroy --target urn1 --target urn2
# pulumi complains that urn1 doesn't exist

As such, I'd love to have some sort of pulumi destroy --target X --its-okay-if-the-target-doesnt-exist

this is very much an edge case and I doubt it'll be actioned on, but wanted to send it out into the ether.

Affected area/feature

pulumi cli

@emiliza
Copy link
Contributor

emiliza commented Dec 9, 2021

This is an interesting edge case, that I think should be solved by #3304 - basically always do the destroy regardless of what the errors are that come back, in this case, ignore the error that something doesn't exist

@wimax-grapl
Copy link
Author

Thanks for the quick response! Yeah, that seems like a better and more-generalized approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

2 participants