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

Allow wildcards in target #2444

Closed
garrettheel opened this issue Jun 23, 2015 · 8 comments
Closed

Allow wildcards in target #2444

garrettheel opened this issue Jun 23, 2015 · 8 comments

Comments

@garrettheel
Copy link

It would be nice to be able to use wildcards in the target command for generating plans and applying changes.

My use case is that I want to roll out changes to my infrastructure in stages based on a naming convention.

For example:

terraform plan -target="test-*" > test.plan

The current output of this is:

Errors:
  * Problem parsing address: "test-*"

I do realise that this is possible using sub-directories and generating plans for each, but this solution proves more flexible.

Thanks!

@vbichov
Copy link

vbichov commented Sep 6, 2015

The ability the address an entire resource would be greatly appreciated, for example:
terraform plan -destroy -target=aws_instance
(which you can't do today - which is kind of strange...)

@HenryTheHamster
Copy link

+1 to this request. Alternatively, an exclude tag for destruction would also be useful. Our use case is wanting to scorch the earth of all our infrastructure except for certain elements such as ELB's to avoid DNS delays.

@beldur
Copy link

beldur commented Mar 2, 2016

Very useful feature.

@lazartravica
Copy link

+1

@hazim1093
Copy link

It would be nice to add wild cards like these too
-target resource.aws_security_group_rule.*

@rojosinalma
Copy link

+1

@catsby
Copy link
Contributor

catsby commented Nov 8, 2016

Hey all – thanks for the suggestion; I'm going to close this a duplicate of #2182

@catsby catsby closed this as completed Nov 8, 2016
@ghost
Copy link

ghost commented Apr 20, 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 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants