Exam Terraform Associate All QuestionsBrowse all questions from this exam
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.

    Correct Answer: B

    The terraform taint command marks a resource as tainted in the Terraform state, indicating that it should be destroyed and recreated in the next apply operation. However, it does not immediately destroy and recreate the resource. This operation will be carried out during the next terraform apply run.

Discussion
HereToReAssureMyselfOption: B

its not immediately The terraform taint command informs Terraform that a particular object has become degraded or damaged. Terraform represents this by marking the object as "tainted" in the Terraform state, and Terraform will propose to replace it in the next plan you create.

EltoothOption: B

B is correct answer. False. "The terraform taint command informs Terraform that a particular object has become degraded or damaged. Terraform represents this by marking the object as "tainted" in the Terraform state, and Terraform will propose to replace it in the next plan you create." FYI - This command is deprecated. For Terraform v0.15.2 and later, we recommend using the -replace option with terraform apply instead. For Terraform v0.15.2 and later, we recommend using the -replace option with terraform apply to force Terraform to replace an object even though there are no configuration changes that would require it. https://www.terraform.io/cli/commands/taint

ilmi70Option: B

B. False The terraform taint command only marks a Terraform-managed resource as tainted, forcing it to be destroyed and recreated on the next apply. However, it does not immediately destroy and recreate the resource. The actual destruction and recreation happen when you run terraform apply.

Ahmad_Terraform

next apply.

Molly1994Option: B

false. taint is marking status, terraform apply make it destroy and recreate

debabrata6983Option: B

It doesn't apply immediately. It will replace the managed resource, which is marked as tainted in the state file, during the next execution cycle (aka terraform apply)

campsOption: B

B. False. When running the command terraform taint against a managed resource in Terraform, you are marking the resource as tainted, which means that it will be recreated during the next terraform apply run. Tainting a resource does not immediately destroy and recreate the resource, but it causes Terraform to consider the resource as out-of-date and recreate it when the configuration is next applied.

fifi1907Option: B

Not A? The terraform taint command manually marks a Terraform-managed resource as tainted, forcing it to be destroyed and recreated on the next apply.

bp339

Terraform will immediately destroy and recreate the resource.. tf doesn't immediately destroy it.. it will just mark it as tainted and in the next plan/apply it will recreate..so answer is B

BennaniHaythemOption: A

True : When you use the terraform taint command, it marks a resource as "tainted", indicating that it needs to be recreated on the next terraform apply run. Once a resource is marked as tainted, Terraform will destroy and recreate it as part of the next apply operation. This behavior is intended to ensure that the resource is recreated from scratch and that any changes to its configuration are applied properly. Therefore, the statement "When running the command terraform taint against a managed resource you want to force recreation upon, Terraform will immediately destroy and recreate the resource" is true.

oab720Option: B

Can only be changed after ‘Terraform apply’