EMT Practice Test

1. Question Content...


Question List

Question1: Which of these statements about HCP Terraform/Terraform Cloud workspaces is false?

Question2: You can develop a custom provider to manage its resources using Terraform.

Question3: When you initialize Terraform, where does it cache modules from the public Terraform Registry?

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

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: How could you reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?

Question7: While attempting to deploy resources into your cloud provider using Terraform, you begin to see some odd behavior and experience slow responses. In order to troubleshoot you decide to turn on Terraform debugging.
Which environment variables must be configured to make Terraform's logging more verbose?

Question8: A resource block is shown in the Exhibit space of this page. What is the Terraform resource name of the resource block?

Question9: A developer accidentally launched a VM (virtual machine) outside of the Terraform workflow and ended up with two servers with the same name. They don't know which VM Terraform manages but do have a list of all active VM IDs.
Which of the following methods could you use to discover which instance Terraform manages?

Question10: Terraform providers are part of the Terraform core binary.

Question11: You cannot install third party plugins using terraform init.

Question12: You should run terraform fnt to rewrite all Terraform configurations within the current working directory to conform to Terraform-style conventions.

Question13: Which argument can you use toprevent unexpected updatesto a module's configuration when calling Terraform Registry modules?

Question14: Why would you use the -replace flag for terraform apply?

Question15: Which of the following should you add in the required_providers block to define a provider version constraint?

Question16: Which Terraform command checks that your configuration syntax is correct?

Question17: When do you need to explicitly execute Terraform in refresh-only mode?

Question18: Terraform encrypts sensitive values stored in your state file.

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

Question20: A Terraform output that sets the "sensitive" argument to true will not store that value in the state file.

Question21: Terraform installs its providers during which phase?

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

Question23: When does Sentinel enforce policy logic during a Terraform Cloud run?

Question24: _______backends support state locking.

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

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

Question27: If a module declares a variable without a default value, you must pass the value of the variable within the module block when you call the module in your configuration.

Question28: How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?

Question29: When you include a module block in your configuration that references a module from the Terraform Registry, the "version" attribute is required.

Question30: Which command doesnotcause Terraform to refresh its state?

Question31: In a Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when you merge or commit changes to version control.

Question32: What type of information can be found on the Terraform Registry when using published modules?

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

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

Question35: By default, if you do not define a backend for your configuration, where does Terraform store information about the resources that it manages?

Question36: Which of these is true about Terraform's plugin-based architecture?

Question37: When you run terraform apply, the Terraform CLI will print output values from both the root module and any child modules.

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

Question39: Which of the following is availableonlyinHCP Terraform workspacesandnot in Terraform CLI?

Question40: The public Terraform Module Registry is free to use.

Question41: Which option cannot be used to keep secrets out of Terraform configuration files?

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

Question43: Terraform providers are always installed from the Internet.

Question44: What type of block is used to construct a collection of nested configuration blocks?

Question45: Which of these are features of Terraform Cloud? Choose two correct answers.

Question46: You have a simple Terraform configuration containing one virtual machine (VM) in a cloud provider. You run terraform apply and the VM is created successfully. What will happen if you terraform apply again immediately afterward without changing any Terraform code?

Question47: Where in your Terraform configuration do you specify a state backend?

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

Question49: As a developer, you want to ensure your plugins are up to date with the latest versions. Which Terraform command should you use?

Question50: Which of these actions will prevent two Terraform runs from changing the same state file at the same time?

Question51: How can terraform plan aid in the development process?

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

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

Question54: When should you run terraform init?

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

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

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

Question58: Which of the following is not a valid source path for specifying a module?

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

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

Question61: Using the terraform state rm command against a resource will destroy it.

Question62: What does state looking accomplish?

Question63: Which method for sharing Terraform modules fulfills the following criteria:
Keeps the module configurations confidential within your organization.
Supports Terraform's semantic version constraints.
Provides a browsable directory of your modules.

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

Question65: If a module declares a variable with a default, that variable must also be defined within the module.

Question66: You created infrastructure outside the Terraform workflow that you now want to manage using Terraform.
Which command brings the infrastructure into Terraform state?

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

Question68: Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?

Question69: What is a Terraform provider not responsible for?

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

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

Question72: You are working on some new application features and you want to spin up a copy of your production deployment to perform some quick tests. In order to avoid having to configure a new state backend, what open source Terraform feature would allow you create multiple states but still be associated with your current code?

Question73: What does terraform import do?

Question74: A Terraform provider is NOT responsible for:

Question75: Which of these are features of HCP Terraform/Terraform Cloud? Pick the 2 correct responses below.

Question76: It is best practice to store secret data in the same version control repository as your Terraform configuration.

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

Question78: A resource block is shown in the Exhibit section of this page. How would you reference the attribute name of this resource in HCL?

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

Question80: Outside of the required_providers block, Terraform configurations always refer to providers by their local names.

Question81: Which of the following arguments are required when declaring a Terraform output?

Question82: Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.

Question83: Which of the following locations can Terraform use as aprivate sourcefor modules?(Pick 2 correct responses)

Question84: How do you specify a module's version when publishing it to the public terraform Module Registry?

Question85: A Terraform backend determines how Terraform loads state and stores updates when you execute which command?

Question86: Which are examples of infrastructure as code? Choose two correct answers.

Question87: Terraformrequiresthe Go runtime as a prerequisite for installation.

Question88: terraform apply will fail if you have not run terraform plan first to update the plan output.

Question89: What does Terraform not reference when running a terraform apply -refresh-only ?

Question90: A child module can always access variables declared in its parent module.

Question91: Which of the following isnotan advantage of using Infrastructure as Code (IaC) operations?

Question92: Before you can use a remote backend, you must first execute terra-form init.

Question93: Which of the following is not a valid Terraform collection type?

Question94: Which of these ate secure options for storing secrets for connecting to a Terraform remote backend? Choose two correct answers.

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

Question96: terraform init creates an example main.tf file in the current directory.

Question97: Your risk management organization requires that new AWS S3 buckets must be private and encrypted at rest.
How can Terraform Cloud automatically and proactively enforce this security control?

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

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

Question100: You have just developed a new Terraform configuration for two virtual machines with a cloud provider. You would like to create the infrastructure for the first time.
Which Terraform command should you runfirst?

Question101: What is modified when executing Terraform inrefresh-only mode?

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

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

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

Question105: Terraform configuration can only call modules from the public registry.

Question106: If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.

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

Question108: A module block is shown in the Exhibit space of this page. When you use a module block to reference a module from the Terraform Registry such as the one in the example, how do you specify version 1.0.0 of the module?

Question109: Changing the Terraform backend from the default "local" backend to a different one after performing your first terrafom apply is:

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

Question111: terraform destroy is the only way to remove infrastructure.

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

Question113: What is the provider for the resource shown in the Exhibit?
resource "aws_vpc" "main" {
name = "test"
}

Question114: A provider configuration block is required in every Terraform configuration.
Example: