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

Bypass CreateBeforeDestroyTransformer on terraform destroy #5096

Merged

Conversation

vancluever
Copy link
Contributor

Reference: #3294, #2493, #2359, possibly others.

This patch ensures that create_before_destroy is ignored during a terraform destroy operation by ensuring its graph transformer does not get added at all. If Destroy is true (ultimately passed in through context), it just gets skipped.

This ensures that this is not even considered during a destroy operation (where destroying resources is the only thing that makes sense), versus a replacement operation (where if you have specified create_before_destroy, you obviously want it).

Also, I have included a couple of simple tests that ensures the presence/non-presence of the transformer appropriately.

@bigkraig
Copy link
Contributor

👍

1 similar comment
@nrcxcia
Copy link

nrcxcia commented Feb 11, 2016

👍

@bigkraig
Copy link
Contributor

@catsby does this look good to you guys?

@arthurschreiber
Copy link

@phinze We're also running into this issue and would love to see this fix (or something similar) be included in the next terraform release.

@phinze
Copy link
Contributor

phinze commented Feb 23, 2016

LGTM - I have another full-stack test I just wrote to exercise this that I'll add on master and link back here.

phinze added a commit that referenced this pull request Feb 23, 2016
…troy_bypass

Bypass CreateBeforeDestroyTransformer on terraform destroy
@phinze phinze merged commit 3d2bd85 into hashicorp:master Feb 23, 2016
phinze added a commit that referenced this pull request Feb 23, 2016
@arthurschreiber
Copy link

@phinze Awesome! Looking forward to this being released! ❤️

bigkraig pushed a commit to bigkraig/terraform that referenced this pull request Mar 1, 2016
@vancluever vancluever deleted the paybyphone_create_before_destroy_bypass branch March 15, 2016 23:11
@ghost
Copy link

ghost commented Apr 27, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants