Terraform provisioners that require authentication can use which of the following blocks?

Prepare for your Terraform Associate Exam with our engaging quiz. Test your knowledge with multiple choice questions and receive detailed explanations to enhance your understanding. Ace your exam with confidence!

The correct choice is based on how Terraform provisioners connect to remote machines to execute scripts or commands. The Connection block is specifically designed to establish the necessary parameters required for communication between the local machine (where Terraform is executed) and the target resource (for example, an EC2 instance).

When using provisioners that require authentication—such as remote-exec or file provisioners—it's essential to define how Terraform should connect to those resources. The Connection block includes details such as the type of connection (SSH, WinRM), host, user, private key or password, and any necessary SSH settings.

This allows Terraform to authenticate securely and effectively, enabling it to perform actions on the remote resources as specified in the provisioners. Thus, the Connection block is vital for establishing these authenticated connections and is the appropriate way to manage credentials for provisioners in Terraform.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy