Terraform Associate Practice Test practice questions, page 7 of 15, with answer review and explanations.
Question 31
Which of the following is the correct way to pass the value in the variable num_servers into a module with the input servers?
servers = num_servers
servers = variable.num_servers
servers = var(num_servers)
servers = var.num_servers
Question 32
A Terraform provisioner must be nested inside a resource configuration block.
True
False
Question 33
Terraform can run on Windows or Linux, but it requires a Server version of the Windows operating system.
True
False
Question 34
What does the default "local" Terraform backend store?
tfplan files
Terraform binary
Provider plugins
State file
Question 35
You have multiple team members collaborating on infrastructure as code (IaC) using Terraform, and want to apply formatting standards for readability. How can you format Terraform HCL (HashiCorp Configuration Language) code according to standard Terraform style convention?
Run the terraform fmt command during the code linting phase of your CI/CD process
Designate one person in each team to review and format everyone's code
Manually apply two spaces indentation and align equal sign "=" characters in every Terraform file (*.tf)
Write a shell script to transform Terraform files using tools such as AWK, Python, and sed