TA-002-P · Question #65
When running the command terraform taint against a managed resource you want to force recreation upon, Terraform will immediately destroy and recreate the resource.
The correct answer is B. False. The 'terraform taint' command marks a resource for recreation during the next 'terraform apply', but it does not immediately destroy or recreate the resource itself.
Question
When running the command terraform taint against a managed resource you want to force recreation upon, Terraform will immediately destroy and recreate the resource.
Options
- ATrue
- BFalse
How the community answered
(60 responses)- A10% (6)
- B90% (54)
Why each option
The 'terraform taint' command marks a resource for recreation during the next 'terraform apply', but it does not immediately destroy or recreate the resource itself.
'terraform taint' only marks a resource in the state file as "tainted," indicating that it should be destroyed and recreated on the *next subsequent 'terraform apply'* operation. It is a preparation step and does not execute any infrastructure changes immediately.
Concept tested: Terraform taint command behavior
Source: https://developer.hashicorp.com/terraform/cli/commands/taint
Topics
Community Discussion
No community discussion yet for this question.