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

Empty -target= points to all resources in state #16360

Closed
beanaroo opened this issue Oct 15, 2017 · 2 comments
Closed

Empty -target= points to all resources in state #16360

beanaroo opened this issue Oct 15, 2017 · 2 comments

Comments

@beanaroo
Copy link

Terraform Version

0.10.7

Since #2253 is still open, consider the following command:

$ terraform apply -target=aws_subnet.public-1 -target=aws_subnet.public-2 
-target=aws_subnet.public-3 -target=aws_subnet.database-1 -target=aws_subnet.database-2 
-target=aws_subnet.database-3 -target=aws_subnet.application-1 -target=aws_subnet.application-2 
-target=aws_subnet.application-3 -target=aws_route_table_association.public-1 
-target=aws_route_table_association.public-2 -target= -target=aws_route_table_association.public-3 
-target=aws_route_table_association.public -target=aws_route_table_association.database 
-target=aws_route_table_association.database-1 -target=aws_route_table_association.database-2 
-target=aws_route_table_association.database-3 -target=aws_route_table_association.application 
-target=aws_route_table_association.application-1 -target=aws_route_table_association.application-2 
-target=aws_route_table_association.application-3 -target=aws_route.application-1

The accidental -target= results in all resources being targeted.

An error would be useful to prevent unwanted changes.

@beanaroo beanaroo changed the title Empty --target= points to all resources in state Empty -target= points to all resources in state Oct 15, 2017
@jbardin jbardin added the bug label Oct 16, 2017
@stephenchu
Copy link
Contributor

The consequence of this bug could actually be disastrous... Hope this gets fixed soon!

@ghost
Copy link

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

4 participants