Free TA-002-P Exam Braindumps

Pass your HashiCorp Certified: Terraform Associate exam with these free Questions and Answers

Page 18 of 19
QUESTION 81

- (Exam Topic 2)
By default, a defined provisioner is a creation-time provisioner.

  1. A. True
  2. B. False

Correct Answer: A
https://www.terraform.io/docs/provisioners/index.html

QUESTION 82

- (Exam Topic 2)
Which one of the following will run echo 0 and echo 1 on a newly created host?

  1. A. provisioner "local-exec" { command = "echo 0" command = "echo 1"}
  2. B. provisioner "remote-exec" { inline = [echo 0,echo 1]}
  3. C. provisioner "remote-exec" {command = "${echo 0}" command = "${echo 1}"}
  4. D. provisioner "remote-exec" { inline = ["echo 0","echo 1"]}

Correct Answer: D
remote-exec Provisioner Example usage
resource "aws_instance" "web" {
# ...
provisioner "remote-exec" { inline = [
"puppet apply",
"consul join ${aws_instance.web.private_ip}",
]
}
}

QUESTION 83

- (Exam Topic 4)
Running terraform fmt without any flags in a directory with Terraform configuration files will check the formatting of those files without changing their contents.

  1. A. True
  2. B. False

Correct Answer: B
The terraform fmt command is used to rewrite Terraform configuration files to a canonical format and style.

QUESTION 84

- (Exam Topic 4)
What kind of configuration block will create an infrastructure object with settings specified in the block?

  1. A. state
  2. B. provider
  3. C. resource
  4. D. data

Correct Answer: C

QUESTION 85

- (Exam Topic 1)
A Terraform provisioner must be nested inside a resource configuration block.

  1. A. True
  2. B. False

Correct Answer: A
Most provisioners require access to the remote resource via SSH or WinRM, and expect a nested connection block with details about how to connect.
Reference: https://www.terraform.io/docs/language/resources/provisioners/connection.html

Page 18 of 19

Post your Comments and Discuss HashiCorp TA-002-P exam with other Community members: