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

adding exclude flag to plan and apply to exclude specified resource from map #3366

Closed
wants to merge 1 commit into from

Conversation

josephholsten
Copy link
Contributor

Rebase of #2326

@phinze
Copy link
Contributor

phinze commented Dec 15, 2015

Hoping to take this for a spin this week. 👍

@josephholsten
Copy link
Contributor Author

@phinze rebased this back onto master, let's see what the tests say

@metcalfc
Copy link

metcalfc commented Jun 7, 2016

Any update here? This would really help me. I'm using remote_state to store the state of a bunch of shared infra (route53, etc) and when I run a terraform plan -destroy I'd love to exclude just the state the burn the rest down. If someone nukes the remote_state its 😢

@aarcro aarcro mentioned this pull request Jun 29, 2016
@holybit
Copy link

holybit commented Sep 19, 2016

👍 as I could use this feature for certain. Any progress?

@carrete
Copy link

carrete commented Nov 4, 2016

👍 as I could use this feature for certain. Any progress?

Same.

@dominik-lekse
Copy link
Contributor

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?

@josephholsten
Copy link
Contributor Author

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.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

todo: fix

log.Printf("[DEBUG] Removing %q, filtered by targeting.", dag.VertexName(v))
g.Remove(v)
if removable {
if targetedNodes.Len() > 0 && !targetedNodes.Include(v) {
Copy link
Contributor Author

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
@purkhusid
Copy link

Any progress on this?

@shantanugadgil
Copy link

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.

@stefanthorpe
Copy link

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.

@rhodrid
Copy link

rhodrid commented Jun 13, 2018

I could really do with this feature right now

@ghost
Copy link

ghost commented Sep 11, 2018

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 update in-place. It would be convenient to just exclude the things we expect to be like that from what's being monitored.

@zoobab
Copy link

zoobab commented Oct 12, 2018

Any update?

@dbaumgarten
Copy link

This PR has been open quite a while now. Are there any plans to complete it? It would be a super usefull feature.

@shantanugadgil
Copy link

4 years!!! Wow! terraform went from separate plugins to single binary and back to providers!☺️☺️☺️

@hashicorp hashicorp deleted a comment from describeme Dec 21, 2019
@hashicorp hashicorp deleted a comment from anupkulkarni24 Dec 21, 2019
@bbetter173
Copy link

This ticket could have started school if it was a particularly gifted child.

@ghost
Copy link

ghost commented Feb 7, 2020

Depends on the state. In North Carolina, I was 5 when I started school. I'm very surprised how long running this is.

@sirlatrom
Copy link
Contributor

sirlatrom commented Feb 7, 2020

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.

@ghost
Copy link

ghost commented Feb 8, 2020

@apparentlymart are we still waiting on you to review this? Thelicense/cla check failed, who needs to do that agreement? Does @josephholsten need to agree to the contributor license agreement?

This feature would still be nice to have.

@josephholsten
Copy link
Contributor Author

I've just submitted my CLA.

@Omarimcblack
Copy link

Omarimcblack commented May 4, 2020

@josephholsten any chance you could fix the conflicts - would be cool to have this implemented.
@apparentlymart the related issue #2253 is ranked 2nd any chance you could also re-intervene

@josephholsten
Copy link
Contributor Author

@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.

@hashicorp-cla
Copy link

CLA assistant check

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.

@JnMik
Copy link

JnMik commented Aug 12, 2020

So @josephholsten , signing that CLA yet ? :D

@josephholsten
Copy link
Contributor Author

Yes, I have signed previous versions of the CLA and I have signed this version. But I’m not the commit author.

@jeffery
Copy link

jeffery commented Aug 19, 2020

Only 6700 commits behind master. @nevins-b Are you around to help move this forward?

@tjhiggins
Copy link

tjhiggins commented Sep 29, 2020

@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.

@josephholsten
Copy link
Contributor Author

@tjhiggins

Yes, I have signed previous versions of the CLA and I have signed this version. But I’m not the commit author.

@mildwonkey
Copy link
Contributor

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!

@mildwonkey mildwonkey closed this Oct 1, 2020
@ghost
Copy link

ghost commented Nov 1, 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 as resolved and limited conversation to collaborators Nov 1, 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.