If a Terraform creation-time provisioner fails, what will occur by default?

Prepare for the HashiCorp Terraform Associate Exam with quizzes, flashcards, and multiple-choice questions. Each question includes hints and explanations. Boost your confidence and ace your exam!

Multiple Choice

If a Terraform creation-time provisioner fails, what will occur by default?

Explanation:
When a creation-time provisioner runs as part of creating a resource, Terraform expects it to succeed. If the provisioner fails, Terraform marks the resource as tainted. This taint signals that the resource should be destroyed and recreated on the next apply to re-run the provisioning and bring the resource to the desired state. So the immediate by-default effect is that the resource becomes tainted, with the next apply performing a destroy-and-recreate cycle to retry provisioning.

When a creation-time provisioner runs as part of creating a resource, Terraform expects it to succeed. If the provisioner fails, Terraform marks the resource as tainted. This taint signals that the resource should be destroyed and recreated on the next apply to re-run the provisioning and bring the resource to the desired state. So the immediate by-default effect is that the resource becomes tainted, with the next apply performing a destroy-and-recreate cycle to retry provisioning.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy