-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Terraform taint/untaint syntax inconsistent with 'plan', 'apply', 'state', etc. #11570
Comments
Just went to report the same, and found out someone has this problem too
|
It's even worse
|
Any update on this? It is causing some confusion for our developers. |
This is a horrible UX pitfall. Took me way too long to figure that if I get this: $ terraform show | grep launch
module.foo.goo.aws_launch_configuration.lc I need to do this: $ terraform taint -module foo.goo aws_launch_configuration.lc |
@yuvadm thanks so much for posting this, saved me a bunch of time. |
Adding to this request.
Why is this a thing? |
This is still an issue. I guess it should be |
This bug has been open for more than a year. What is the barrier to getting it fixed? |
Hi all! Sorry for the inconsistency of this command. The There is already PR #12289 open to address this, but unfortunately due to an oversight on my part we missed it for the 0.11 release window. Since it's a breaking change to the usage of this command I've labelled the PR as "breaking-change", which we use to locate PRs that should be merged during the release period for the next major release, which will be 0.12. There is not yet a fixed release date for 0.12 since we're still early in its development cycle, but it will be released once we've made good progress on the current focus of integrating an improved version of the configuration language parser and interpreter. With that PR now properly labelled we'll make sure it will be merged while we're prepping for the initial 0.12 release. |
@apparentlymart Please, consider adding some magic key or an alias for This will allow you to bring it in in |
This one looks like a dup #15447 btw |
If you are creating resources using
(The hint was in #14357) Definitely doesn't help that
|
+1 this is a big time waster, especially when it comes to nested modules and arrays as described by @amitsaha . |
Hi all, This is fixed in Thanks also to @huydinhle for the first pass at fixing this. Other refactoring for v0.12.0 meant that the final implementation was unfortunately quite different in the details, but the design discussion on #12289 was invaluable to see how to implement this behavior against the new internal Terraform APIs that v0.12 work has introduced. |
Confusion has not become less, at all. I've tried +10 attempts to taint an AWS instance deployed via Technically the issue may have been solved, but the usage confusion still exists to the same extend as before. |
@apparentlymart. This documentation need to be updated https://www.terraform.io/docs/commands/taint.html to use the syntax terraform taint -module . I tried tainting using the documented procedure and it kept on failing. @amitsaha thank you for the tip. |
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. |
The
terraform taint
command uses different syntax than all of the other commands, which leads to inconvenient scripting, command-line errors, etc.Specific Examples:
taint syntax:
terraform taint -module mymodule aws_route53_record.myresource.0
other syntax:
terraform plan -target module.mymodule.aws_route53_record.myresource[0]
terraform apply -target module.mymodule.aws_route53_record.myresource[0]
terraform state show module.mymodule.aws_route53_record.myresource[0]
Is there any plan to allow the
taint/untaint
command totarget
syntax as other commands (namely, fully qualified names including the module, and bracket-array indicies)?
Is there any specific reason why they are different?
If not, would you entertain pull requests to add this enhancement?
Terraform Version
0.7 - 0.8.5
Affected Resource(s)
*core
The text was updated successfully, but these errors were encountered: