What must you do to pass the value to a child module in the configuration?
You have declared an input variable called environment in your parent module. What must you do to pass the value to a child module in the configuration?A . Add node_count = var.node_count B. Declare the variable in a terraform.tfvars file C. Declare a node_count input variable for child module D....
Which of the following commands would you use first?
You run a local-exec provisioner in a null resource called null_resource.run_script and realize that you need to rerun the script. Which of the following commands would you use first?A . terraform taint null_resource.run_script B. terraform apply -target=null_resource.run_script C. terraform validate null_resource.run_script D. terraform plan -target=null_resource.run_scriptView AnswerAnswer: A Explanation: https://www.terraform.io/cli/commands/taint
What type of block is used to construct a collection of nested configuration blocks?
What type of block is used to construct a collection of nested configuration blocks?A . for_each B. repeated C. nesting D. dynamicView AnswerAnswer: D Explanation: https://www.terraform.io/language/expressions/dynamic-blocks
How can you format Terraform HCL (HashiCorp Configuration Language) code according to standard Terraform style convention?
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?A . Run the terraform fmt command during the code linting phase of your...
Terraform providers are always installed from the Internet.
Terraform providers are always installed from the Internet.A . True B. FalseView AnswerAnswer: B Explanation: Terraform configurations must declare which providers they require, so that Terraform can install and use them. Reference: https://www.terraform.io/docs/language/providers/configuration.html
Which options will produce a list of the IDs?
You have declared a variable called var.list which is a list of objects that all have an attribute id. Which options will produce a list of the IDs? (Choose two.)A . { for o in var.list: o => o.id } B. var.list[*].id C. [ var.list[*].id ] D. [ for o...
Why will the apply fail?
You write a new Terraform configuration and immediately run terraform apply in the CLI using the local backend. Why will the apply fail?A . Terraform needs you to format your code according to best practices first B. Terraform needs to install the necessary plugins first C. The Terraform CLI needs...
Which command should you use to show all of the resources that will be deleted?
You have used Terraform to create an ephemeral development environment in the cloud and are now ready to destroy all the infrastructure described by your Terraform configuration. To be safe, you would like to first see all the infrastructure that will be deleted by Terraform. Which command should you use...
Which of these is the best practice to protect sensitive values in state files?
Which of these is the best practice to protect sensitive values in state files?A . Blockchain B. Secure Sockets Layer (SSL) C. Enhanced remote backends D. Signed Terraform providersView AnswerAnswer: C Explanation: Use of remote backends and especially the availability of Terraform Cloud, there are now a variety of backends...
How would you reference the "name" value of the second instance of this fictitious resource?
How would you reference the "name" value of the second instance of this fictitious resource? A . element(aws_instance.web, 2) B. aws_instance.web[1].name C. aws_instance.web[1] D. aws_instance.web[2].name E. aws_instance.web.*.nameView AnswerAnswer: B Explanation: https://www.terraform.io/language/meta-arguments/count#referring-to-instances Reference: https://www.terraform.io/docs/configuration-0-11/interpolation.html