EMT Practice Test

1. Question Content...


Question List

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

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

Question3: Module version is required to reference a module on the Terraform Module Registry.

Question4: In Terraform HCL, an object type of object ({name=string, age-number}) would match this value.

Question5: Which is the best way to specify a tag of v1.0.0 when referencing a module stored in Git (for example. Git: https://example.com/vpc.git)?

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

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

Question8: 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?

Question9: When you use a remote backend that needs authentication, HashiCorp recommends that you:

Question10: Which of these ate features of Terraform Cloud? Choose two correct answers.

Question11: When using a remote backend or terraform Cloud integration, where does Terraform save resource sate?

Question12: 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?

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

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

Question15: You are writing a child Terraform module that provisions an AWS instance. You want to reference the IP address returned by the child module in the root configuration. You name the instance resource
"main'.
Which of these is the correct way to define the output value?

Question16: What is one disadvantage of using dynamic blocks in Terraform?

Question17: Which backend does the Terraform CU use by default?

Question18: Which of these statements about Terraform Cloud workspaces is false?

Question19: If a DevOps team adopts AWS CloudFormation as their standardized method for provisioning public cloud resoruces, which of the following scenarios poses a challenge for this team?

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

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

Question22: Which provider authentication method prevents credentials from being stored in the state file?

Question23: Which command must you first run before performing further Terraform operations in a working directory?

Question24: You've used Terraform to deploy a virtual machine and a database. You want to replace this virtual machine instance with an identical one without affecting the database.
What is the best way to achieve this using Terraform?

Question25: Which of the following commands would you use to access all of the attributes and details of a resource managed by Terraform?

Question26: Which command add existing resources into Terraform state?

Question27: You must use different Terraform commands depending on the cloud provider you use.

Question28: Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.

Question29: 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.

Question30: _______backends support state locking.

Question31: Terraform configuration (including any module references) can contain only one Terraform provider type.

Question32: What does state looking accomplish?

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

Question34: Which of the following ate advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.

Question35: How would you output returned values from a child module in the Terraform CLI output?

Question36: You're building a CI/CD (continuous integration/continuous delivery) pipeline and need to inject sensitive variables into your Terraform run.
How can you do this safely?

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

Question38: What value does the Terraform Cloud private registry provide over the public Terraform Module Registry?

Question39: One remote backend configuration always maps to a single remote workspace.

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

Question41: You have to initialize a Terraform backend before it can be configured.

Question42: Which of the following should you put into the required_providers block?

Question43: Which of the following methods, used to provision resources into a public cloud, demonstrates the concept of infrastructure as code?

Question44: If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?

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

Question46: Which of the following is not a key principle of infrastructure as code?

Question47: HashiCorp Configuration Language (HCL) supports user-denned functions.

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

Question49: 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?

Question50: Which of these commands makes your code more human readable?

Question51: 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

Question52: You have a Terraform configuration that defines a single virtual machine with no references to it, You have run terraform apply to create the resource, and then removed the resource definition from your Terraform configuration file.
What will happen you run terraform apply in the working directory again?

Question53: A developer on your team is going lo leaf down an existing deployment managed by Terraform and deploy a new one. However, there is a server resource named aws instant.ubuntu[l] they would like to keep.
What command should they use to tell Terraform to stop managing that specific resource?

Question54: Module variable assignments are inherited from the parent module and you do not need to explicitly set them.

Question55: If a DevOps team adopts AWS CloudFormation as their standardized method for provisioning public cloud resoruces, which of the following scenarios poses a challenge for this team?

Question56: 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?

Question57: Which configuration consistency errors does terraform validate report?

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

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

Question60: You modified your Terraform configuration and run Terraform plan to review the changes.
Simultaneously, your teammate manually modified the infrastructure component you are working on.
Since you already ran terraform plan locally, the execution plan for terraform apply will be the same.

Question61: You have used Terraform lo create an ephemeral development environment in the (loud 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 Terraform will delete.
Which command should you use to show all of the resources that mil be deleted? Choose two correct answers.

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