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 explicit delete-before-replace #2415

Merged
merged 4 commits into from
Jan 31, 2019
Merged

Add support for explicit delete-before-replace #2415

merged 4 commits into from
Jan 31, 2019

Conversation

pgavlin
Copy link
Member

@pgavlin pgavlin commented Jan 31, 2019

These changes add a new flag to the various ResourceOptions types that
indicates that a resource should be deleted before it is replaced, even
if the provider does not require this behavior. The usual
delete-before-replace cascade semantics apply.

Fixes #1620.

These changes add a new flag to the various `ResourceOptions` types that
indicates that a resource should be deleted before it is replaced, even
if the provider does not require this behavior. The usual
delete-before-replace cascade semantics apply.

Fixes #1620.
@@ -182,7 +182,8 @@ def do_resolve(value: Any, perform_apply: bool, exn: Optional[Exception]):
protect=opts.protect,
provider=resolver.provider_ref,
dependencies=resolver.dependencies,
propertyDependencies=property_dependencies
propertyDependencies=property_dependencies,
deleteBeforeReplace=opts.delete_before_replace
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add a test for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

sure--what sort? just a unit test to ensure that it's passed appropriately?

Copy link
Contributor

Choose a reason for hiding this comment

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

yep, something simple like that.

Copy link
Contributor

Choose a reason for hiding this comment

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

(I had a bug with opts.protect where it didn't get passed, so I'm hoping to get good test coverage on fundamentals like passing opts to the engine 😆 )

Copy link
Contributor

@swgillespie swgillespie left a comment

Choose a reason for hiding this comment

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

LGTM

@ellismg
Copy link
Contributor

ellismg commented Jan 31, 2019

Please update CHANGELOG.md.

@pgavlin pgavlin merged commit 6e90ab0 into master Jan 31, 2019
@pulumi-bot pulumi-bot deleted the pgavlin/dbr branch January 31, 2019 22:27
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.

None yet

3 participants