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!
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...)
+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.
Very useful feature.
+1
It would be nice to add wild cards like these too
-target resource.aws_security_group_rule.*
+1
Hey all – thanks for the suggestion; I'm going to close this a duplicate of https://github.com/hashicorp/terraform/issues/2182
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.
Most helpful comment
+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.