TA-002-P · Question #87
Terraform provisioners that require authentication can use the ______ block.
The correct answer is A. connection. Terraform provisioners that interact with remote resources and require authentication can utilize the connection block to define how to establish a connection, including specifying authentication details like SSH keys or WinRM credentials.
Question
Terraform provisioners that require authentication can use the ______ block.
Options
- Aconnection
- Bcredentials
- Csecrets
- Dssh
How the community answered
(52 responses)- A94% (49)
- B2% (1)
- D4% (2)
Why each option
Terraform provisioners that interact with remote resources and require authentication can utilize the `connection` block to define how to establish a connection, including specifying authentication details like SSH keys or WinRM credentials.
The `connection` block within a Terraform resource or provisioner is used to define the parameters for connecting to the remote resource where the provisioner will execute. This includes specifying connection type (e.g., SSH, WinRM) and authentication details like username, password, or private key.
`credentials` is not a standard Terraform block used for provisioner authentication; authentication details are part of the `connection` block.
`secrets` is not a standard Terraform block for provisioner authentication; while secrets are used, their configuration for connection is via the `connection` block.
`ssh` is a type of connection protocol, not a generic block for all authentication; the `connection` block encapsulates various types, including SSH.
Concept tested: Terraform provisioner connection block for authentication
Source: https://developer.hashicorp.com/terraform/language/resources/provisioners/syntax#connection-block
Topics
Community Discussion
No community discussion yet for this question.