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 #2326

Closed
wants to merge 10 commits into from
Closed

adding exclude flag to plan and apply #2326

wants to merge 10 commits into from

Conversation

nevins-b
Copy link
Contributor

This will exclude the specified resource and it's dependents from the graph.

Addresses #2253

@phinze
Copy link
Contributor

phinze commented Jun 12, 2015

Wow this is great work, @nevins-b - thank you!

I think we can actually fold this into targeting, which will make the UX a bit more cohesive and the implementation simpler as well.

My proposal is that we introduce a ! prefix to negate the target:

terraform plan -target '!aws_db_instance.important'`

Then the implementation is basically just tacking your central loop onto the end of the TargetsTransformer.

What do you think?

@nevins-b
Copy link
Contributor Author

@phinze Thanks!

That seems reasonable. The parseTargetAddresses function will need to be modified but it shouldn't be too bad.

jefferai and others added 10 commits June 15, 2015 11:31
regex solution is extremely complex, which makes it hard to debug and
understand; the original switches and
commenting lay out the various cases in a straightforward fashion. Plus,
implementing namespace/repo support in the original code was a simple
strings.Join call.
…rom map

reverting changes, changing target to exclude when using !

cleanup
@josephholsten
Copy link
Contributor

@nevins-b this sounds awesome! what's the next step here? is it just rebasing onto master?

I also notice a lot of unrelated code in the diff. I think the only part that should be here is https://github.com/aocsolutions/terraform/commit/c7551d0bd9568aca48ec6eb10f1095029992f34b

@josephholsten
Copy link
Contributor

Rebased at #3366

@nevins-b can you check that out and verify all's well?

@little-arhat
Copy link

Any updates on this?

@phinze
Copy link
Contributor

phinze commented Dec 15, 2015

Definitely want to land this! Closing this PR to roll into #3366 and will follow up there.

@phinze phinze closed this Dec 15, 2015
@ghost
Copy link

ghost commented Apr 29, 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 29, 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.

7 participants