141. Variables declared within a module are accessible outside of the module.
A. True
B. False
Answer
B
142. Which of the following is not a valid Terraform variable type?
A. list
B. map
C. array
D. string
Answer
C
143. What is a key benefit of the Terraform state file?
A. A state file can be used to schedule recurring infrastructure tasks
B. A state file represents a source of truth for resources provisioned with a public cloud console
C. A state file represents the desired state expressed by the Terraform code files
D. A state file represents a source of truth for resources provisioned with Terraform
Answer
D
144. Which of these statements about Terraform Enterprise workspaces is false?
A. They can securely store cloud credentials
B. You must use the CLI to switch between workspaces
C. Plans and applies can be triggered via version control system integrations
D. They have role-based access controls
Answer
B
145. Define the purpose of state in Terraform.
A. State is used to map real world resources to your configuration and keep track of metadata
B. State is a method of codifying the dependencies of related resources
C. State is used to enforce resource configurations that relate to compliance policies
D. State is used to store variables and quickly reuse existing code
Answer
A
146. Which backend does the Terraform CLI use by default?
A. API
B. Remote
C. Terraform Cloud
D. Local
E. HTTP
Answer
D
147. Using the terraform state rm command against a resource will destroy it.
A. True
B. False
Answer
B
148. Which method for sharing Terraform configurations keeps them confidential within your organization, supports Terraform’s semantic version constraints, and provides a browsable directory?
A. Generic git repository
B. Terraform Cloud/Terraform Enterprise private module registry
C. Public Terraform Module Registry
D. Subfolder within a workspace
Answer
B
149. Which of the following is the correct way to pass the value in the variable num_servers into a module with the input servers in HCL2?
A. servers – var.num_servers
B. servers – num_servers
C. servers – var(num_servers)
D. $(var.num_servers)
Answer
A
150. Terraform destroy is the only way to remove infrastructure.
A. True
B. False
Answer
B
151. The ________ determines how Terraform creates, updates, or deletes resources.
A. Terraform configuration
B. Terraform core
C. Terraform provider
D. Terraform provisioner
Answer
C