31. Which command lets you experiment with Terraform expressions?
A. terraform console
B. terraform validate
C. terraform env
D. terraform test
Answer
A
32. What kind of configuration block will create an infrastructure object with settings specified within the block?
A. provider
B. state
C. data
D. resource
Answer
D
33. When do changes invoked by terraform apply take effect?
A. After Terraform has updated the state file
B. Once the resource provider has fulfilled the request
C. Immediately
D. None of the above are correct
Answer
B
34. What is the workflow for deploying new infrastructure with Terraform?
A. Write Terraform configuration, run terraform init to initialize the working directory or workspace, and run terraform apply
B. Write Terraform configuration, run terraform show to view proposed changes, and terraform apply to create new infrastructure
C. Write Terraform configuration, run terraform apply to create infrastructure, use terraform validate to confirm Terraform deployed resources correctly
D. Write Terraform configuration, run terraform plan to initialize the working directory or workspace, and terraform apply to create the infrastructure
Answer
A
35. Which of these are features of Terraform Cloud? (Choose two.)
A. Remote state storage
B. A web-based user interface (UI)
C. Automatic backups
D. Automated infrastructure deployment visualization
Answer
A, B
36. Which option cannot keep secrets out of Terraform configuration files?
A. A shared credential file
B. Mark the variable as sensitive
C. Environment Variables
D. A -var flag
Answer
D
37. Which of the following is not true of Terraform providers?
A. An individual person can write a Terraform Provider
B. A community of users can maintain a provider
C. HashiCorp maintains some providers
D. Cloud providers and infrastructure vendors can write, maintain, or collaborate on Terraform providers
E. None of the above
Answer
E
38. Which Terraform command checks that your configuration syntax is correct?
A. terraform fmt
B. terraform validate
C. terraform init
D. terraform show
Answer
B
39. terraform validate uses provider APIs to verify your infrastructure settings.
A. True
B. False
Answer
B
40. You add a new provider to your configuration and immediately run terraform apply in the CLI using the local backend. Why does the apply fail?
A. Terraform needs you to format your code according to best practices first
B. Terraform requires you to manually run terraform plan first
C. The Terraform CLI needs you to log into Terraform Cloud first
D. Terraform needs to install the necessary plugins first
Answer
D