- (Exam Topic 4)
You need to specify a dependency manually. What resource meta-parameter can you use lo make sure Terraform respects thee dependency?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.
Solution:
depends_on
Does this meet the goal?
Correct Answer:
A
- (Exam Topic 2)
terraform refresh command will not modify infrastructure, but does modify the state file.
Correct Answer:
A
The terraform refresh command is used to reconcile the state Terraform knows about (via its state file) with the real-world infrastructure. This can be used to detect any drift from the last-known state, and to update the state file. This does not modify infrastructure, but does modify the state file.
https://www.terraform.io/docs/commands/refresh.html
- (Exam Topic 1)
Terraform provisioners that require authentication can use the _____ block.
Correct Answer:
A
https://www.terraform.io/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." "Connection blocks don't take a block label and can be nested within either a resource or a provisioner."
- (Exam Topic 4)
Which of the following is not a benefit of adopting infrastructure as code?
Correct Answer:
D
- (Exam Topic 4)
You need to write some Terraform code that adds 42 firewall rules to a security group as shown in the example.
What can you use to avoid writing 42 different nested ingress config blocks by hand?
Correct Answer:
D
A dynamic block acts much like a for expression, but produces nested blocks instead of a complex typed value. It iterates over a given complex value, and generates a nested block for each element of that complex value. Reference: https://www.terraform.io/language/expressions/dynamic-blocks