- (Exam Topic 2)
By default, a defined provisioner is a creation-time provisioner.
Correct Answer:
A
https://www.terraform.io/docs/provisioners/index.html
- (Exam Topic 2)
Which one of the following will run echo 0 and echo 1 on a newly created host?
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}",
]
}
}
- (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.
Correct Answer:
B
The terraform fmt command is used to rewrite Terraform configuration files to a canonical format and style.
- (Exam Topic 4)
What kind of configuration block will create an infrastructure object with settings specified in the block?
Correct Answer:
C
- (Exam Topic 1)
A Terraform provisioner must be nested inside a resource configuration block.
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