-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
core: fix resource targeting w/ provisioners #1544
Conversation
Did a bit more investigation and confirmed this only applies in Scoping down the commit message to indicate it's only in targeted destroy. 👍 |
95aa294
to
66a5a39
Compare
Looks good, but I feel that we should inverse the logic of targeting. it seems brittle in the current approach of "if something, keep it." Instead I think it should be "if targetable and NOT what we're targeting, throw it away". That way the graph contains everything except the non-targetable things. That would avoid this and any future issues of adding more graph nodes. |
The `TargetTransform` was dropping provisioner nodes, which caused graph validation to fail with messages about uninitialized provisioners when a `terraform destroy` was attempted. This was because `destroy` flops the dependency calculation to try and address any nodes in the graph that "depend on" the target node. But we still need to keep the provisioner node in the graph. Here we switch the strategy for filtering nodes to only drop addressable, non-targeted nodes. This should prevent us from having to whitelist nodes to keep in the future. closes #1541
66a5a39
to
5e67657
Compare
Good call - done! PTAL |
@mitchellh bump for review of inverted strategy here |
LGTM |
core: fix resource targeting w/ provisioners
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. |
The
TargetTransform
was dropping provisioner nodes, which caused graphvalidation to fail with messages about uninitialized provisioners.
closes #1541