Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 242


Which provisioner invokes a process on the machine running Terraform?

Show Answer
Correct Answer: C

The 'local-exec' provisioner is used to execute a command or script on the machine running Terraform. This is opposed to the 'remote-exec' provisioner, which runs commands on the resource being provisioned. Therefore, the correct answer is 'local-exec'.

Discussion

5 comments
Sign in to comment
tabkarOption: C
May 7, 2023

https://developer.hashicorp.com/terraform/language/resources/provisioners/local-exec

trextor
May 10, 2024

C. local-exec The local-exec provisioner is used to execute a command or script locally on the machine running Terraform. It's often used for tasks such as running scripts after resource creation or performing local setup/configuration tasks.

Oleg_golOption: C
May 6, 2023

C. local-exec

enry99itaOption: A
Dec 11, 2023

local-exec provisioner is execute on the local machine.

enry99ita
Dec 15, 2023

vote C

090200fOption: C
Jul 31, 2024

The local-exec provisioner invokes a local executable after a resource is created. This invokes a process on the machine running Terraform, not on the resource. https://developer.hashicorp.com/terraform/language/resources/provisioners/local-exec

090200f
Jul 31, 2024

The remote-exec provisioner invokes a script on a remote resource after it is created. This can be used to run a configuration management tool, bootstrap into a cluster, etc. To invoke a local process, see the local-exec provisioner instead. The remote-exec provisioner requires a connection and supports both ssh and winrm.