-
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
adding exclude flag to plan and apply to exclude specified resource from map #3366
Conversation
Hoping to take this for a spin this week. 👍 |
b5718dd
to
b33cc53
Compare
@phinze rebased this back onto master, let's see what the tests say |
Any update here? This would really help me. I'm using |
👍 as I could use this feature for certain. Any progress? |
Same. |
Hi @phinze, @josephholsten, during developing infrastructure with Terraform this is a feature I currently miss. Besides a pending conflict resolution, is there anything preventing us to merge this functionality, i.e. the general idea/implementation of this feature? |
well, I've rebased this but the tests are still failing. That's the next step. |
@@ -171,7 +171,8 @@ Options: | |||
|
|||
-target=resource Resource to target. Operation will be limited to this | |||
resource and its dependencies. This flag can be used | |||
multiple times. | |||
multiple times. Prefixing the resource with ! will | |||
exclude the resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: fix
terraform/transform_targets.go
Outdated
log.Printf("[DEBUG] Removing %q, filtered by targeting.", dag.VertexName(v)) | ||
g.Remove(v) | ||
if removable { | ||
if targetedNodes.Len() > 0 && !targetedNodes.Include(v) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
targetedNodes.Len() > 0
breaks TestCloseProviderTransformer_withTargets
…rom map reverting changes, changing target to exclude when using ! cleanup
Any progress on this? |
My use case is that there are some plan errors in an independent resource, and for the time being I want to just exclude it and see if everything else is fine. |
This feature makes total sense to me. I have 2 modules that I want to exclude on destory, but 10+ that I want to include, obviously its best to exclude here than a massive long include. |
I could really do with this feature right now |
Is this still being worked on? My team could use the exclude flag for terraform plans that we're running nightly to monitor drift in our terraform repo. We have a few items that are always going to be |
Any update? |
This PR has been open quite a while now. Are there any plans to complete it? It would be a super usefull feature. |
4 years!!! Wow! terraform went from separate plugins to single binary and back to providers! |
This ticket could have started school if it was a particularly gifted child. |
Depends on the state. In North Carolina, I was 5 when I started school. I'm very surprised how long running this is. |
I'm going to unsubscribe due to this PR having been converted to a comedian school. I suggest anyone who finds it important creates a new PR rebased on master such that it can even be merged. |
@apparentlymart are we still waiting on you to review this? The This feature would still be nice to have. |
I've just submitted my CLA. |
@josephholsten any chance you could fix the conflicts - would be cool to have this implemented. |
@Omarimcblack No, as you can see from this ticket's history, I have rebased this many times already. I didn't even write this code in the first place. @apparentlymart knows how to get ahold of me if hashicorp really wants this. |
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Have you signed the CLA already but the status is still pending? Recheck it. |
So @josephholsten , signing that CLA yet ? :D |
Yes, I have signed previous versions of the CLA and I have signed this version. But I’m not the commit author. |
Only 6700 commits behind master. @nevins-b Are you around to help move this forward? |
@josephholsten could you submit a new pr so you can sign? Our team would find this incredibly useful. Edit: I can also submit the pr if you'd prefer. |
|
hi! I am cleaning up some older PRs and am going to close this one. Please do chime in on the linked issue if you are still interested - we haven't forgotten this request, but it's going to take some careful design and isn't on our immediate roadmap. Thanks! |
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. |
Rebase of #2326