Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 128

As a member of the operations team, you need to run a script on a virtual machine created by Terraform. Which provision is best to use in your Terraform code?

    Correct Answer: C

    To run a script on a virtual machine created by Terraform, the remote-exec provisioner is the best choice. The remote-exec provisioner allows you to execute commands or scripts on a remote resource, which is suitable for configuring the virtual machine after its creation.

Discussion
RVivekOption: C

remote-exec to run anything on the deployed virtual machine. local exec is to run anything on the system where terraform is running

bluee

thanks mate

Uma10Option: C

The remote-exec provisioner invokes a script on a remote resource after it is created. To invoke a local process, see the local-exec provisioner instead. Source: https://www.terraform.io/language/resources/provisioners/remote-exec

BurakkoOption: C

On a VM , it is a remote-exec.

keiffo2Option: C

remote-exec all day

bora4motionOption: C

VM is not local, I go with remote, C

imkhanOption: C

C- remote-exec is the correct answer If you need to run a script on a virtual machine created by Terraform, the remote-exec provisioner is the best choice. The remote-exec provisioner allows you to run commands or scripts on a remote machine, which is especially useful for configuring and provisioning resources after they have been created.

Only5Option: C

Source: https://www.terraform.io/language/resources/provisioners/remote-exec

legendary7Option: C

c is the correct answer