- (Exam Topic 4)
What does the command terraform fmt do?
Correct Answer:
A
The terraform fmt command is used to rewrite Terraform configuration files to a canonical format and style. This command applies a subset of the Terraform language style conventions, along with other minor adjustments for readability.
Other Terraform commands that generate Terraform configuration will produce configuration files that conform to the style imposed by terraform fmt, so using this style in your own files will ensure consistency.
https://www.terraform.io/docs/commands/fmt.html
- (Exam Topic 2)
Which of the following best describes a Terraform provider?
Correct Answer:
A
A provider is responsible for understanding API interactions and exposing resources. Providers generally are an IaaS (e.g. Alibaba Cloud, AWS, GCP, Microsoft Azure, OpenStack), PaaS (e.g. Heroku), or SaaS services (e.g.Terraform Cloud, DNSimple, Cloudflare).
https://www.terraform.io/docs/providers/index.html
- (Exam Topic 1)
All standard backend types support state storage, locking, and remote operations like plan. apply and destroy.
Correct Answer:
B
https://www.terraform.io/language/settings/backends/configuration
"Some of these backends act like plain remote disks for state files, while others support locking the state while operations are being performed. This helps prevent conflicts and inconsistencies. The built-in backends listed are the only backends. You cannot load additional backends as plugins."
- (Exam Topic 4)
By default, where does Terraform store its state file?
Correct Answer:
D
By default, the state file is stored in a local file named "terraform.tfstate", but it can also be stored remotely, which works better in a team environment.
- (Exam Topic 1)
Which of the following is not a valid Terraform collection type?
Correct Answer:
C
https://www.terraform.io/language/expressions/type-constraints#collection-types