91. ____________ backends support state locking.
A. Some
B. No
C. Only local
D. All
Answer
A
92. Which of the following methods, used to provision resources into a public cloud, demonstrates the concept of infrastructure as code?
A. curl commands manually run from a terminal
B. A sequence of REST requests you pass to a public cloud API endpoint
C. A script that contains a series of public cloud CLI commands
D. A series of commands you enter into a public cloud console
Answer
C
93. Which of the following should you put into the required_providers block?
A. version >= 3.1
B. version = “>= 3.1”
C. version ~> 3.1
Answer
B
94. When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
A. Before you run terraform import
B. You can import infrastructure without corresponding Terraform code
C. Terraform will generate the corresponding configuration files for you
D. After you run terraform import
Answer
A
95. Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?
A. terraform fmt -write=false
B. terraform fmt -list -recursive
C. terraform fmt -check -recursive
D. terraform fmt -check
Answer
C
96. What features stop multiple users from operating on the Terraform state at the same time?
A. Provider constraints
B. Remote backends
C. State locking
D. Version control
Answer
C
97. You are creating a reusable Terraform configuration and want to include a billing_dept tag so your Finance team can track team-specific spending on resources. Which of the following billing_dept variable declarations will allow you to do this?
A.
variable "billing_dept" {
optional = true
}
B.
variable "billing_dept" {
type = optional(string)
}
C.
variable "billing_dept" {
default = ""
}
D.
variable "billing_dept" {
type = default
}
Answer
C
98. Which of these are secure options for storing secrets for connecting to a Terraform remote backend? (Choose two.)
A. Inside the backend block within the Terraform configuration
B. Defined in Environment variables
C. Defined in a connection configuration outside of Terraform
D. A variable file
Answer
B, C
99. You want to define a single input variable to capture configuration values for a server. The values must represent memory as a number, and the server name as a string.
Which variable type could you use for this input?
A. List
B. Object
C. Map
D. Terraform does not support complex input variables of different types
Answer
B
100. What does Terraform not reference when running a terraform apply -refresh-only?
A. Credentials
B. State file
C. Terraform resource definitions in configuration files
D. Cloud provider
Answer
C