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?
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
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.
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.
RVivek
Highly Voted 2 years, 2 months agobluee
1 year, 10 months agoUma10
Highly Voted 2 years, 2 months agoimkhan
Most Recent 1 year, 1 month agoOnly5
1 year, 9 months agolegendary7
2 years, 1 month agokeiffo2
2 years, 2 months agobora4motion
2 years, 2 months agoBurakko
2 years, 2 months ago