EMT Practice Test

1. Question Content...


Question List

Question1: You ate making changes to existing Terraform code to add some new infrastructure. When is the best time to run terraform validate?

Question2: When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?

Question3: In a Terraform Cloud workpace linked to a version control repository speculative plan rum start automatically commit changes to version control.

Question4: You have provisioned some virtual machines (VMs) on Google Cloud Platform (GCP) using the gcloud command line tool. However, you are standardizing with Terraform and want to manage these VMs using Terraform instead. What are the two things you must do to achieve this? Choose two correct answers.

Question5: Select the command that doesn't cause Terraform to refresh its state.

Question6: What information does the public Terraform Module Registry automatically expose about published modules?

Question7: You add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The existing and new resources use the same provider. The working contains a .terraform.lock, hc1 file.
How will Terraform choose which version of the provider to use?

Question8: Once you configure a new Terraform backend with a terraform code block, which command(s) should you use to migrate the state file?

Question9: You ate creating a Terraform configuration which needs to make use of multiple providers, one for AWS and one for Datadog. Which of the following provider blocks would allow you to do this?

Question10: terraform validate confirms that your infrastructure matches the Terraform state file.

Question11: What is the workflow for deploying new infrastructure with Terraform?

Question12: Which of the following is not a valid Terraform variable type?

Question13: Your DevOps team is currently using the local backend for your Terraform configuration. You would like to move to a remote backend to store the state file in a central location. Which of the following backends would not work?

Question14: Which method for sharing Terraform configurations fulfills the following criteria:
1. Keeps the configurations confidential within your organization
2. Support Terraform's semantic version constrains
3. Provides a browsable directory

Question15: You can reference a resource created with for_each using a Splat ( *) expression.

Question16: What does the default "local" Terraform backend store?

Question17: A module can always refer to all variables declared in its parent module.

Question18: You have created a main.tf Terraform configuration consisting of an application server, a database and a load balanced. You ran terraform apply and Terraform created all of the resources successfully.
Now you realize that you do not actually need the load balancer, so you run terraform destroy without any flags. What will happen?

Question19: When using multiple configuration of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?

Question20: How can a ticket-based system slow down infrastructure provisioning and limit the ability to scale? Choose two correct answers.

Question21: How does the Terraform cloud integration differ from other state backends such as S3, Consul,etc?

Question22: 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 correct answers.

Question23: What is a key benefit of the Terraform state file?

Question24: Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.

Question25: Why does this backend configuration not follow best practices?

Question26: Terraform variable names are saved in the state file.

Question27: What are some benefits of using Sentinel with Terraform Cloud/Terra form Cloud? Choose three correct answers.

Question28: Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?

Question29: Which parameters does terraform import require? Choose two correct answers.

Question30: Which of the following statements about Terraform modules is not true?

Question31: When do changes invoked by terraform apply take effect?

Question32: What kind of configuration block will create an infrastructure object with settings specified within the block?

Question33: What does Terraform use the .terraform.lock.hc1 file for?

Question34: You are using a networking module in your Terraform configuration with the name label my-network. In your main configuration you have the following code:

When you run terraform validate, you get the following error:

What must you do to successfully retrieve this value from your networking module?

Question35: What is the Terraform style convention for indenting a nesting level compared to the one above it?

Question36: You decide to move a Terraform state file to Amazon S3 from another location. You write the code below into a file called backend.tf.

Which command will migrate your current state file to the new S3 remote backend?

Question37: What does state looking accomplish?

Question38: What feature stops multiple users from operating on the Terraform state at the same time?

Question39: Variables declared within a module are accessible outside of the module.

Question40: Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?

Question41: You much initialize your working directory before running terraform validate.