exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 65 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 65
Topic #: 1
[All Terraform Associate Questions]

When running the command terraform taint against a managed resource you want to force recreation upon, Terraform will immediately destroy and recreate the resource.

  • A. True
  • B. False
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
HereToReAssureMyself
Highly Voted 2 years, 6 months ago
Selected Answer: 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.
upvoted 20 times
...
Eltooth
Highly Voted 2 years, 6 months ago
Selected Answer: 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
upvoted 15 times
...
muammer32
Most Recent 2 weeks ago
Selected Answer: B
The terraform taint command does not immediately destroy and recreate the resource. The resource will only be destroyed and recreated when you run terraform apply after tainting it.
upvoted 1 times
...
bora4motion
4 months, 1 week ago
Selected Answer: B
taint > plan> apply I go with B.
upvoted 1 times
...
Molly1994
6 months, 3 weeks ago
false. taint is marking status, terraform apply make it destroy and recreate
upvoted 2 times
...
ilmi70
10 months, 1 week ago
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.
upvoted 4 times
...
debabrata6983
1 year, 4 months ago
Selected Answer: 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)
upvoted 2 times
...
BennaniHaythem
1 year, 8 months ago
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.
upvoted 1 times
...
camps
1 year, 9 months ago
Selected Answer: 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.
upvoted 2 times
...
oab720
1 year, 11 months ago
Selected Answer: B
Can only be changed after ‘Terraform apply’
upvoted 1 times
...
Ahmad_Terraform
2 years, 5 months ago
next apply.
upvoted 4 times
...
fifi1907
2 years, 7 months ago
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.
upvoted 2 times
bp339
2 years, 6 months ago
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
upvoted 8 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago