- (Exam Topic 2)
Which of the following command can be used to view the specified version constraints for all providers used in the current configuration.
Correct Answer:
A
Use the terraform providers command to view the specified version constraints for all providers used in the current configuration.
https://www.terraform.io/docs/configuration/providers.html
- (Exam Topic 1)
Which backend does the Terraform CLI use by default?
Correct Answer:
D
"By default, Terraform implicitly uses a backend called local to store state as a local file on disk. Every other
backend stores state in a remote service of some kind, which allows multiple people to access it. Accessing state in a remote service generally requires some kind of access credentials, since state data contains extremely sensitive information." https://www.terraform.io/language/settings/backends
- (Exam Topic 4)
What command can you run to generate DOT (Document Template) formatted data to visualize Terraform dependencies?
Correct Answer:
C
The terraform graph command is used to generate a visual representation of either a configuration or execution plan. The output is in the DOT format, which can be used by GraphViz to generate charts.
- (Exam Topic 3)
Command terraform refresh will update state file?
Correct Answer:
B
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. If the state is changed, this may cause changes to occur during the next plan or apply.
https://www.terraform.io/docs/commands/refresh.html
- (Exam Topic 4)
Which of the following is an invalid variable name?
Correct Answer:
A
https://www.terraform.io/intro/examples/count.html