Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 87 discussion

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

Terraform provisioners that require authentication can use the ______ block.

  • A. connection
  • B. credentials
  • C. secrets
  • D. ssh
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
BaburTurk
Highly Voted 1 year, 3 months ago
Selected Answer: A
The answer is A. connection. The connection block is used to configure the authentication settings for a Terraform provisioner. This includes the username, password, and SSH key that will be used to connect to the remote resource. The credentials and secrets blocks are used to store sensitive information, such as passwords and SSH keys. These blocks are not directly used by provisioners, but they can be referenced by the connection block. The ssh block is used to configure the SSH client that Terraform will use to connect to the remote resource. This block is not typically used by provisioners, as the connection block can be used to configure the SSH client for all provisioners. Here is an example of a connection block for a provisioner that requires SSH authentication: connection { host = "example.com" user = "root" password = "my-password" }
upvoted 10 times
...
NashP
Most Recent 9 months, 3 weeks ago
resource "aws_instance" "example" { ami = "ami-0c55b159cbfafe1f0" instance_type = "t2.micro" connection { type = "ssh" user = "ec2-user" private_key = file("~/.ssh/private_key.pem") } provisioner "remote-exec" { inline = [ "echo 'Hello, World!' > hello.txt", ] } } A connection
upvoted 3 times
...
Tlakmini
1 year, 3 months ago
Selected Answer: A
https://developer.hashicorp.com/terraform/cli/config/config-file
upvoted 1 times
...
Power123
1 year, 7 months ago
A is correct. Connection block
upvoted 2 times
...
tgaos
1 year, 8 months ago
Selected Answer: A
https://developer.hashicorp.com/terraform/language/resources/provisioners/connection Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
upvoted 4 times
...
resnef
1 year, 10 months ago
Selected Answer: A
connection block: https://developer.hashicorp.com/terraform/language/resources/provisioners/connection#connection-block
upvoted 1 times
...
adouban
1 year, 11 months ago
Selected Answer: A
A is correct
upvoted 1 times
...
asudhin
2 years, 1 month ago
Selected Answer: A
It is A
upvoted 1 times
...
Burakko
2 years, 2 months ago
Selected Answer: A
Must be the connection block.
upvoted 1 times
...
aadi1121
2 years, 4 months ago
Selected Answer: A
https://www.terraform.io/language/resources/provisioners/connection
upvoted 3 times
...
Eltooth
2 years, 4 months ago
Selected Answer: A
A is correct answer : connection. "Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect." "Connection blocks don't take a block label and can be nested within either a resource or a provisioner." https://www.terraform.io/language/resources/provisioners/connection
upvoted 3 times
...
Zam88
2 years, 5 months ago
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect. A
upvoted 2 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 ...