Terraform provisioners that require authentication can use which block?

Prepare for the HashiCorp Terraform Associate Exam. Utilize flashcards and multiple-choice questions with detailed hints and explanations. Boost your confidence and be ready for success!

Multiple Choice

Terraform provisioners that require authentication can use which block?

Explanation:
Provisioners that run on a remote resource rely on a connection block to authenticate and connect to that resource. When you attach a provisioner like remote-exec or file, Terraform uses the connection block to specify how to reach the target: the host, the user, and the authentication method (such as a private key or a password). It can also indicate the transport type, with SSH for Linux/Unix targets and WinRM for Windows targets. This connection information is exactly what enables Terraform to perform the provisioning steps on the remote machine. Other options don’t represent the standard mechanism Terraform uses for provisioning authentication, and there isn’t a standalone “ssh” or “credentials” block used in place of a connection block.

Provisioners that run on a remote resource rely on a connection block to authenticate and connect to that resource. When you attach a provisioner like remote-exec or file, Terraform uses the connection block to specify how to reach the target: the host, the user, and the authentication method (such as a private key or a password). It can also indicate the transport type, with SSH for Linux/Unix targets and WinRM for Windows targets. This connection information is exactly what enables Terraform to perform the provisioning steps on the remote machine. Other options don’t represent the standard mechanism Terraform uses for provisioning authentication, and there isn’t a standalone “ssh” or “credentials” block used in place of a connection block.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy