I have in a main.tf
, an instance of a module:
module "cleaders" {
source = "../leaders"
...
}
And I want to _taint_ that module, so I run tf taint:
ᐅ tf taint module.cleaders
The module root has no resources. There is nothing to taint.
I see talk of which resource to target in a module in taint's docs https://terraform.io/docs/commands/taint.html, but I am unable to figure out how to taint a module (from root) so that the entire module is rm'd on the next apply.
You can taint resources within modules:
terraform taint -module=cleaders resource.designator
Ie. I often use terraform taint -module=salt_master aws_instance.salt_master
to reprovision my configuration management servers.
Granted, this is different from tainting the entire module; I'm not sure how to go about that except for tainting all resources.
thanks @arubis! I have used your confirmation to update the docs a tiny bit.
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
You can taint resources within modules:
terraform taint -module=cleaders resource.designator
Ie. I often use
terraform taint -module=salt_master aws_instance.salt_master
to reprovision my configuration management servers.Granted, this is different from tainting the entire module; I'm not sure how to go about that except for tainting all resources.