HashiCorp Certified: Terraform Associate (003) (HCTA0-003) Questions and Answers
Question 57
The_________determines how Terraform creates, updates, or delete resources.
Options:
A.
Terraform configuration
B.
Terraform provisioner
C.
Terraform provider
D.
Terraform core
Answer:
C
Explanation:
This is what determines how Terraform creates, updates, or deletes resources, as it is responsible for understanding API interactions with some service and exposing resources and data sources based on that API.
Question 58
What does the default "local" Terraform backend store?
Options:
A.
tfplan files
B.
State file
C.
Provider plugins
D.
Terraform binary
Answer:
B
Explanation:
The default “local” Terraform backend stores the state file in a local file named terraform.tfstate, which can be used to track and manage the state of your infrastructure3.
Question 59
What does state looking accomplish?
Options:
A.
Prevent accidental Prevent accident deletion of the state file
B.
Blocks Terraform commands from modifying, the state file
C.
Copies the state file from memory to disk
D.
Encrypts any credentials stored within the state file
Answer:
B
Explanation:
This is what state locking accomplishes, by preventing other users from modifying the state file while a Terraform operation is in progress. This prevents conflicts and data loss.
Question 60
Why does this backend configuration not follow best practices?
Options:
A.
An alias meta-argument should be included in backend blocks whenever possible
B.
You should use the local enhanced storage backend whenever possible
C.
You should not store credentials in Terraform configuration
D.
The backend configuration should contain multiple credentials so that more than one user can execute terraform plan and terraform apply
Answer:
C
Explanation:
This is a bad practice, as it exposes your credentials to anyone who can access your configuration files or state files. You should use environment variables, credential files, or other mechanisms to provide credentials to Terraform.