Which provisioner runs a process on the created resource?

Prepare for your Terraform Associate Exam with our engaging quiz. Test your knowledge with multiple choice questions and receive detailed explanations to enhance your understanding. Ace your exam with confidence!

The provisioner that runs a process on the created resource is the remote-exec provisioner. This type of provisioner is designed to execute scripts or commands directly on the remote resource that has just been created. For example, if you are provisioning a virtual machine in the cloud, the remote-exec provisioner allows you to run commands within the context of that machine after it has been provisioned.

Using the remote-exec provisioner is beneficial when you need to configure the resource or install software as part of the deployment process. It connects to the resource via SSH (for Linux-based systems) or WinRM (for Windows), executing the specified commands in the proper environment of the created resource.

In contrast, the local-exec provisioner runs commands on the machine where Terraform is executed, not on the target resource itself. Null-exec is a placeholder provisioner that does nothing, and "command-exec" is not a recognized Terraform provisioner type. Thus, remote-exec is the correct choice for running processes on the resource that has been created.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy