Which parameters does the import block require? (Pick the 2 correct responses below.)
Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?
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?
You want to use API tokens and other secrets within your team ' s Terraform workspaces. Where does HashiCorp recommend you store these sensitive values? (Pick 3)
You manage two workspaces in your HCP Terraform organization. The first workspace manages your network configuration. The second workspace manages your compute resources and retrieves values from the networking workspace.
What HCP Terraform feature lets you run an apply operation on the compute workspace every time you update the networking workspace?
All modules published on the official Terraform Module Registry have been verified by HasihCorp.
You can define multiple backend blocks in your Terraform configuration to store your state in multiple locations.
Which option cannot be used to keep secrets out of Terraform configuration files?
Outside of the required_providers block, Terraform configurations always refer to providers by their local names.
When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
What is the provider for the resource shown in the Exhibit?
resource " aws_vpc " " main " {
name = " test "
}
You want to use API tokens and other secrets within your team ' s Terraform workspaces. Where does HashiCorp recommend you store these sensitive values? (Pick the 3 correct responses)
Which of the following does HCP Terraform perform during a health assessment for a workspace?
Pick the 2 correct responses below:
Your team adopts AWS CloudFormation as the standardized method for provisioning public cloud resources.
Which scenario presents a challenge for your team?
How would you reference the volume IDs associated with the ebs_block_device blocks in this configuration?

How does the Terraform cloud integration differ from other state backends such as S3, Consul,etc?
Terraform configuration (including any module references) can contain only one Terraform provider type.
terraform apply will fail if you have not run terraform plan first to update the plan output.
Which command must you first run before performing further Terraform operations in a working directory?
Exhibit:
resource " kubernetes_namespace " " example " {
name = " test "
}
A resource block is shown in the exhibit. How would you reference the name attribute of this resource in HCL?
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.
You use a cloud provider account that is shared with other team members. You previously used Terraform to create a load balancer that listens on port 80. After application changes, you updated the Terraform code to change the port to 443.
You run terraform plan and see that the execution plan shows the port changing from 80 to 443 like you intended and step away to grab some coffee.
In the meantime, another team member manually changes the load balancer port to 443 through the cloud provider console before you get back to your desk.
What will happen when you run terraform apply upon returning to your desk?
Exhibit.
You need to deploy resources into two different regions in the same Terraform configuration. To do this, you declare multiple provider configurations as shown in the Exhibit space on this page.
What meta-argument do you need to configure in a resource block to deploy the resource to the us-west-2 AWS region?
You’ve just finished refactoring part of your Terraform workspace’s configuration to use a module to manage some of your resources. When you plan your changes, you notice that Terraform will destroy and recreate the affected resources. Doing so could cause unintended downtime in the application your workspace manages. What supported approach should you take to complete the refactor without destroying and recreating your resources?
A resource block is shown in the Exhibit section of this page. How would you reference the attribute name of this resource in HCL?
You need to destroy all of the resources in your Terraform workspace, except for aws_instance.ubuntu[1], which you want to keep. How can you tell Terraform to stop managing that specific resource without destroying it?
Changing the Terraform backend from the default " local " backend to a different one after performing your first terrafom apply is:
As a developer, you want to ensure your plugins are up to date with the latest versions. Which Terraform command should you use?
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?
You created infrastructure outside the Terraform workflow that you now want to manage using Terraform. Which command brings the infrastructure into Terraform state?
Which of the following should you add in the required_providers block to define a provider version constraint?
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.
You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new provider?
Which provider authentication method prevents credentials from being stored in the state file?
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?
What value does the Terraform Cloud private registry provide over the public Terraform Module Registry?
You have a saved execution plan containing desired changes for infrastructure managed by Terraform. After running the command terraform apply my.tfplan , you receive the error shown in the exhibit below.
Exhibit:
Error: Saved plan is stale
The given plan file can no longer be applied because the state was changed by another operation after the plan was created.
How can you apply the desired changes? (Choose TWO correct answers)
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?
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?
If a module declares a variable with a default, that variable must also be defined within the module.
Module variable assignments are inherited from the parent module and you do not need to explicitly set them.
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?
A)

B)
C)
D)
You want to define multiple data disks as nested blocks inside the resource block for a virtual machine. What Terraform feature would help you define the blocks using the values in a variable?
You’ve enabled DEBUG-level logging for Terraform, and you’d like to send the log data to a file. Which action should you take?
Your root module contains a variable namednum_servers. Which is the correct way to pass its value to a child module with an input namedservers?
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.
Exhibit:
variable " sizes " {
type = list(string)
description = " Valid server sizes "
default = [ " small " , " medium " , " large " ]
}
A variable declaration is shown in the exhibit. Which is the correct way to get the value of medium from this variable?
What kind of configuration block will manage an infrastructure object with settings specified within the block?
You are updating a child module with the resource block shown in the exhibit below. The public_ip attribute of the resource needs to be accessible to the parent module.
Exhibit:
resource " aws_instance " " example " {
ami = " ami-0a123456789abcdef "
instance_type = " t3.micro "
}
How do you meet this requirement?
You have a list of numbers that represents the number of free CPU cores on each virtual cluster:
numcpus = [ 18, 3, 7, 11, 2 ]
What Terraform function could you use to select the largest number from the list?
You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs for your code. What is the best method to quickly find the IP address of the resource you deployed?
Which are benefits of migrating from a local state backend to a remote backend? (Pick the 2 correct responses below.)
You are responsible for a set of infrastructure that is managed by two workspaces: example-network and example-compute . The example-compute workspace uses data from output values configured in the example-network workspace and must be deployed afterward. Currently, this is a manual process:
An operator deploys changes to the example-network workspace.
They manually copy the output values from the example-network workspace to input variables configured for the example-compute workspace.
They deploy the example-compute workspace.
Which HCP Terraform features can you use to automate this process?
Pick the two correct responses below.
What is the Terraform style convention for indenting a nesting level compared to the one above it?
You should run terraform fnt to rewrite all Terraform configurations within the current working directory to conform to Terraform-style conventions.
A Terraform backend determines how Terraform loads state and stores updates when you execute which command?
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?
Which of the following locations can Terraform use as aprivate sourcefor modules?(Pick 2 correct responses)
You need to deploy resources into two different regions in the same Terraform configuration using the block shown in the exhibit below.
What do you need to add to the provider configuration to deploy the resource to the us-west-2 AWS region?
A
B.

C.

D.

You can execute terraform fmt to standardize all Terraform configurations within the current working directory to Terraform’s canonical format and style.
Which features do HCP Terraform workspaces provide that are not available in Terraform Community Edition? (Pick the 3 correct responses below.)
You ate making changes to existing Terraform code to add some new infrastructure. When is the best time to run terraform validate?
A senior admin accidentally deleted some of your cloud instances. What will Terraform do when you run terraform apply?