exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 7 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 7
Topic #: 1
[All Terraform Associate Questions]

Which provisioner invokes a process on the resource created by Terraform?

  • A. remote-exec
  • B. null-exec
  • C. local-exec
  • D. file
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Cloud9er
Highly Voted 2 years, 7 months ago
No. Answer is remote-exec. because...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. (this is from the terraform web site)
upvoted 24 times
...
Eltooth
Highly Voted 2 years, 5 months ago
Selected Answer: A
A is correct answer : remote-exec. "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://www.terraform.io/language/resources/provisioners/local-exec "The remote-exec provisioner invokes a script on a remote resource after it is created." https://www.terraform.io/language/resources/provisioners/remote-exec
upvoted 5 times
...
muammer32
Most Recent 2 weeks, 1 day ago
Selected Answer: A
The remote-exec provisioner is the one that invokes a process on the resource created by Terraform, running commands or scripts on the remote machine after it has been provisioned.
upvoted 1 times
...
Bere
3 months ago
Selected Answer: A
The remote-exec provisioner invokes a script on a remote resource created by Terraform. It connects to the resource using SSH or WinRM and runs the provided inline or script commands. Here's an example of how you might use it: resource "aws_instance" "example" { ami = "ami-0c94855ba95c574c8" instance_type = "t2.micro" provisioner "remote-exec" { inline = [ "echo Hello, World! > /home/ubuntu/hello", "chmod +x /home/ubuntu/hello", ] } } There's no null-exec provisioner in Terraform. The local-exec provisioner invokes a local executable after a resource is created. It runs on the machine where Terraform is being executed. The file provisioner is used to copy files or directories from the machine executing Terraform to the newly created resource.
upvoted 3 times
...
090200f
5 months, 3 weeks ago
A is correct ans : "process on the resource" is key point here. so remote-exec. 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.
upvoted 1 times
...
Jayanth
1 year, 5 months ago
A. remote-exec
upvoted 1 times
...
Busi57
1 year, 5 months ago
Selected Answer: A
remote-exec -> A
upvoted 1 times
...
Mandeeps468
1 year, 6 months ago
A - correct answer : remote-exec
upvoted 1 times
...
wsyh
1 year, 7 months ago
Selected Answer: A
Vote A. local-exec provisioner is execute on the local machine.
upvoted 1 times
...
Chandru1988
1 year, 7 months ago
Definitely Remote-exec
upvoted 1 times
...
Power123
1 year, 9 months ago
A is correct
upvoted 1 times
...
Mal_8
1 year, 10 months ago
Selected Answer: A
A is the correct answer : remote-exec
upvoted 3 times
...
Zam88
2 years, 6 months ago
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. remote-exec correct
upvoted 1 times
...
subhala
2 years, 6 months ago
I think it is remote-exec, the question is asking about on the resource created by terraform. local-exec runs on the machine where we run terraform.
upvoted 1 times
...
softarts
2 years, 7 months ago
I take A remote-exec.
upvoted 3 times
...
Eniras
2 years, 7 months ago
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. See the remote-exec provisioner to run commands on the resource. https://www.terraform.io/language/resources/provisioners/local-exec
upvoted 3 times
...
calebvar
2 years, 8 months ago
Isn't local exec also correct?
upvoted 1 times
Ahmad_Terraform
2 years, 6 months ago
Eniras explained well about the Local Exec,
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago