TA-002-P · Question #7
Which provisioner invokes a process on the resource created by Terraform?
The correct answer is A. remote-exec. The remote-exec provisioner runs scripts or commands directly on the remote resource that Terraform just created (e.g., a VM), connecting via SSH or WinRM. In contrast, local-exec runs commands on the machine where Terraform itself is executing, not on the provisioned resource. T
Question
Which provisioner invokes a process on the resource created by Terraform?
Options
- Aremote-exec
- Bnull-exec
- Clocal-exec
- Dfile
How the community answered
(62 responses)- A94% (58)
- B2% (1)
- C2% (1)
- D3% (2)
Explanation
The remote-exec provisioner runs scripts or commands directly on the remote resource that Terraform just created (e.g., a VM), connecting via SSH or WinRM. In contrast, local-exec runs commands on the machine where Terraform itself is executing, not on the provisioned resource. The file provisioner copies files to the remote resource but does not execute them. null-exec is not a real Terraform provisioner.
Topics
Community Discussion
No community discussion yet for this question.