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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the deletedWith resource option #437

Merged
merged 4 commits into from
Jan 31, 2023
Merged

Conversation

justinvp
Copy link
Member

This adds support for the deletedWith resource option that has recently been added to the Node.js, Python, .NET, and Go SDKs.

In many cases there is no need to deleted resources if the container resource is going to be deleted as well.

A few examples:

  • Database object (roles, tables) when database is being deleted
  • Cloud IAM bindings when user itself is being deleted

This helps with:

  • Speeding the deletion process
  • Removing unnecessary calls to providers
  • Avoiding failed deletions when the pulumi user running the plan has access to the container resource but not the contained ones

To avoid deleting contained resources, set the deletedWith resource option to the container resource.

Fixes #432

This adds support for the `deletedWith` resource option that has recently been added to the Node.js, Python, .NET, and Go SDKs.

In many cases there is no need to deleted resources if the container resource is going to be deleted as well.

A few examples:
- Database object (roles, tables) when database is being deleted
- Cloud IAM bindings when user itself is being deleted

This helps with:
- Speeding the deletion process
- Removing unnecessary calls to providers
- Avoiding failed deletions when the pulumi user running the plan has access to the container resource but not the contained ones

To avoid deleting contained resources, set the `deletedWith` resource option to the container resource.
Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a textbook change. LGTM.

P.S. I would look into the upgraded version of pu/pu when investigating why the tests fail.

@aq17
Copy link
Contributor

aq17 commented Jan 28, 2023

@justinvp I added a small commit and associated PR in pu/pu that should allow the option to be passed on pulumi convert

deletedWith is not a string URN, it's a resource
The test requires pulumi-std 0.1.0 and I can't quite figure out how to make the test work with the pre-release std library, so skipping for now.
@justinvp justinvp merged commit 0369c39 into main Jan 31, 2023
@justinvp justinvp deleted the justin/deletedwith branch January 31, 2023 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for the DeletedWith resource option
3 participants