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

Prepare for the HashiCorp Terraform Associate Exam. Utilize flashcards and multiple-choice questions with detailed hints and explanations. Boost your confidence and be ready for success!

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