81. Which statement describes a goal of infrastructure as code?
A. A pipeline process to test and deliver software
B. Defining a vendor-agnostic API
C. Write once, run anywhere
D. The programmatic configuration of resources
Answer
D
82. terraform validate confirms the syntax of Terraform files.
A. True
B. False
Answer
A
83. Which command adds existing resources into Terraform state?
A. terraform init
B. terraform plan
C. terraform refresh
D. terraform import
E. All of these
Answer
D
84. It is best practice to store secret data in the same version control repository as your Terraform configuration.
A. True
B. False
Answer
B
85. Which of the following commands would you use to access all of the attributes and details of a resource managed by Terraform?
A. terraform state list ‘provider_type.name’
B. terraform state show ‘provider_type.name’
C. terraform get ‘provider_type.name’
D. terraform state list
Answer
B
86. terraform validate confirms that your infrastructure matches the Terraform state file.
A. True
B. False
Answer
B
87. A senior admin accidentally deleted some of your cloud instances. What does Terraform do when you run terraform apply?
A. Build a completely brand-new set of infrastructure
B. Tear down the entire workspace infrastructure and rebuild it
C. Rebuild only the instances that were deleted
D. Stop and generate an error message about the missing instances
Answer
C
88. terraform init creates an example main.tf file in the current directory.
A. True
B. False
Answer
B
89. You are working on some new application features and you want to spin up a copy of your production deployment to perform some quick tests. In order to avoid having to configure a new state backend, what open source Terraform feature would allow you create multiple states but still be associated with your current code?
A. Terraform data sources
B. Terraform local values
C. Terraform modules
D. Terraform workspaces
E. None of the above
Answer
D
90. Which provisioner invokes a process on the machine running Terraform?
A. remote-exec
B. file
C. local-exec
D. null-exec
Answer
C