The HCP Terraform private registry keeps the module configurations confidential within your organization.
Module version is required to reference a module on the Terraform Module Registry.
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?
When should you use the force-unlock command?
What is the workflow for deploying new infrastructure with Terraform?
INcheck block ' s assertion fails, Terraform blocks the current operation from executing.
Which configuration consistency errors does terraform validate report?
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?
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?
Where does HashiCorp recommend you store API tokens and other secrets within your team ' s Terraform workspaces?
Pick three correct responses below:
Which of the following can you do with terraform plan? (Pick 2 correct responses)
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?
How can you configure a Terraform workspace to store its state remotely?
You can develop a custom provider to manage its resources using Terraform.
You can access state stored with the local backend by using terraform_remote_state data source.
Which of the following does HCP Terraform perform during a health assessment for a workspace?
What functionality do providers offer in Terraform?(Pick 3 correct responses)
terraform validate uses provider APIs to verify your infrastructure settings.
How can terraform plan aid in the development process?
Exhibit:
resource " aws_instance " " example " {
ami = " ami-0a123456789abcdef "
instance_type = " t3.micro "
}
You are updating a child module with the resource block shown in the exhibit. The public_ip attribute of the resource needs to be accessible to the parent module. How do you meet this requirement?
Select the command that doesn’t cause Terraform to refresh its state.
If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.
Which command(s) adds existing resources in a public cloud into Terraform state?
You much initialize your working directory before running terraform validate.
A Terraform local value can reference other Terraform local values.
How does the Terraform cloud integration differ from other state backends such as S3, Consul,etc?
terraform apply will fail if you have not run terraform plan first to update the plan output.
Where in your Terraform configuration do you specify remote state storage settings?
Exhibit:
data " aws_ami " " web " {
most_recent = true
owners = [ " self " ]
tags = {
Name = " web-server "
}
}
A data source is shown in the exhibit. How do you reference the id attribute of this data source?
Which type of block fetches or computes information for use elsewhere in a Terraform configuration?
What is terraform plan -refresh-only intended to detect?
terraform validate reports syntax check errors for which of the following?
You must use different Terraform commands depending on the cloud provider you use.
You are creating a reusable Terraform configuration and want to include an optional billing_dept tag so your Finance team can track team-specific spending on resources. Which of the following billing_dept variable declarations will achieve this?
Where can Terraform not load a provider from?
What’s the proper syntax for the plan command?
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?
Infrastructure as Code (laC) can be stored in a version control system along with application code.
Which command must you run before you run a plan or apply for the first time?
You are tasked with making a change to an infrastructure stack running in a public cloud using HCP Terraform/Terraform Cloud. Which pattern follows IaC best practices?
Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.
What does terraform import do?
After creating a new Terraform configuration, your configuration passes terraform validate but returns an “Access Denied” error from the cloud provider when running terraform plan.
Why did terraform validate not catch this issue?
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 delete the VM using the cloud provider console, then run terraform apply again without changing any Terraform code?
Which of the following locations can Terraform use as aprivate sourcefor modules?(Pick 2 correct responses)
Which task does terraform init not perform?
If one of your modules uses a local value, you can expose that value to callers of the module by defining a Terraform output in the module’s configuration.

The Terraform configuration shown in the Exhibit space on this page v/ill create a new AWS instance.
How do you specify a module’s version when publishing it to the public terraform Module Registry?
When should you use the terraform force-unlock command?
terraform destroy is the only way to remove infrastructure with Terraform.
Which of these actions are forbidden when the Terraform state file is locked? (Pick the 3 correct responses)
What functionality do providers offer in Terraform? (Pick the 3 correct responses below.)
How would you reference the volume IDs associated with the ebs_block_device blocks in this configuration?

You want to know from which paths Terraform is loading providers referenced in your Terraform configuration (* files). You need to enable additional logging messages to find this out. Which of the following would achieve this?
Which features do HCP Terraform workspaces provide that are not available in Terraform Community Edition? (Pick the 3 correct responses below.)
A module can always refer to all variables declared in its parent module.
What kind of configuration block will create an infrastructure object with settings specified within the block?
What kind of configuration block will manage an infrastructure object with settings specified within the block?
Terraform requires using a different provider for each cloud provider where you want to deploy resources.
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.
You have to initialize a Terraform backend before it can be configured.
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.
Which of these ate secure options for storing secrets for connecting to a Terraform remote backend? Choose two correct answers.
When you use a backend that requires authentication, it is best practice to:
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?
Part of a configuration is shown in the exhibit below.
You want to pass the id of the vsphere_datacenter data source to the datacenter_id argument of the vsphere_folder resource.
Which reference would you use?
When using multiple configuration of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?
Which of these commands makes your code more human readable?
A data source is shown in the exhibit below.
How do you reference the id attribute of this data source?

}
}
Your team is collaborating on infrastructure using Terraform and wants to format code to follow Terraform language style conventions. How can you update your code to meet these requirements?
Your configuration contains a module block that references a module from the Terraform Registry and sets the version argument to 1.0. You just published a new version of the module and updated your configuration to point to version 1.1.
Which command must be run to install the new version?
Where in your Terraform configuration do you specify a state backend?
Which command generates DOT (Document Template) formatted data to visualize Terraform dependencies?
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?
How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
Terraform providers are always installed from the Internet.
Which of the following can you do with terraform plan?
Pick the two correct responses below.
Which argument can you set on a module block to prevent Terraform from updating the module’s configuration during an init or get operation?
Which is not a benefit of adopting IaC (Infrastructure as Code)?
When does Sentinel enforce policy logic during a Terraform Cloud run?
Your team is using version 3.1.4 of a module from the public Terraform Registry, and they are worried about possible breaking changes in future versions of the module. Which version argument should you add to the module block to prevent newer versions from being used?
All standard backend types support state locking, and remote operations like plan, apply, and destroy.
A Terraform output that sets the " sensitive " argument to true will not store that value in the state file.
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?
Running terraform fmt without any flags in a directory with Terraform configuration files will check the formatting of those files, but will never change their contents.
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 correct responses)
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 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 ' re writing a Terraform configuration that needs to read input from a local file called id_rsa.pub . Which built-in Terraform function can you use to import the file ' s contents as a string?
You just scaled your VM infrastructure and realize you set the count variable to the wrong value. You correct the value and save your change. What must you do next to make your infrastructure match your configuration?
Changing the Terraform backend from the default " local " backend to a different one after performing your first terrafom apply is:
When a check block’s assertion fails, Terraform blocks the current operation from executing.

A resource block is shown in the Exhibit space of this page. What is the provider for this resource?
How can a ticket-based system slow down infrastructure provisioning and limit the ability to scale? Choose two correct answers.
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 type of information does the Terraform Registry provide about the modules it hosts?
You can install community and partner plugins using terraform init.
Why would you use the -replace flag for terraform apply?
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?
Which command add existing resources into Terraform state?
Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?
Does terraform init create an example main.tf file in the current directory?
Terraform encrypts sensitive values stored in your state file.
What does terraform destroy do?
Which command doesnotcause Terraform to refresh its state?
Exhibit:
provider " aws " { region = " us-east-1 " }
provider " aws " { region = " us-west-2 " }
You need to deploy resources into two different AWS regions in the same Terraform configuration using the provider blocks shown in the exhibit. What do you need to add to the provider configuration to deploy a resource to the us-west-2 AWS region?
Terraform providers are part of the Terraform core binary.
Which Terraform collection type should you use to store key/value pairs?