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?
Infrastructure as Code (laC) can be stored in a version control system along with application code.
Which of these are benefits of using Sentinel with HCP Terraform/Terraform Cloud? (Pick the 3 correct responses)
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 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.
When you use a backend that requires authentication, it is best practice to:
Which of the following is not a valid source path for specifying a module?
You much initialize your working directory before running terraform validate.
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?
You modified your Terraform configuration to fix a typo in the resource ID by renaming it from photoes to photos. What configuration will you add to update the resource ID in state without destroying the existing resource?
Original configuration:
resource " aws_s3_bucket " " photoes " {
bucket_prefix = " images "
}
Updated configuration:
resource " aws_s3_bucket " " photos " {
bucket_prefix = " images "
}
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
When you run terraform apply, the Terraform CLI will print output values from both the root module and any child modules.
Which of the following is availableonlyinHCP Terraform workspacesandnot in Terraform CLI?
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?
Which of these are features of Terraform Cloud? Choose two correct answers.
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?
Which of these ate features of Terraform Cloud? Choose two correct answers.
Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?
Before you can use a remote backend, you must first execute terra-form init.
Which of the following should you add in the required_providers block to define a provider version constraint?
Which of these are features of HCP Terraform/Terraform Cloud? Pick the 2 correct responses below.
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)
If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.
Which statements are true about terraform apply ? (Choose TWO correct answers)
Which of the following is true about terraform apply?(Pick 2 correct responses)
Which of these actions are forbidden when the Terraform state file is locked? (Pick the 3 correct responses)
A resource block is shown in the Exhibit space of this page. What is the Terraform resource name of the resource block?
Which of these are features of HCP Terraform/Terraform Cloud? (Pick the 2 correct responses)
What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?
Which provider authentication method prevents credentials from being stored in the state file?
Which option cannot be used to keep secrets out of Terraform configuration files?
A provider configuration block is required in every Terraform configuration.
Example:

Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?
Why is it considered important to treat your Terraform state file as sensitive?
You can define multiple backend blocks in your Terraform configuration to store your state in multiple locations.
Your Terraform configuration declares a variable. You want to enforce that its value meets your specific requirements, and you want to block the Terraform operation if it does not. What should you add to your configuration?
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?
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 command can you run to generateDOT (Graphviz)formatted data to visualize Terraform dependencies?
Once you configure a new Terraform backend with a terraform code block, which command(s) should you use to migrate the state file?
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)
A senior admin accidentally deleted some of your cloud instances. What will Terraform do when you run terraform apply?
When using multiple configurations of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?
Which of the following arguments are required when declaring a Terraform output?
Which of the following can you do with terraform plan? (Pick 2 correct responses)
A Terraform backend determines how Terraform loads state and stores updates when you execute which command?
Your team adopts AWS CloudFormation as the standardized method for provisioning public cloud resources. Which scenario presents a challenge for your team?
Which parameters does the import block require? (Pick the 2 correct responses below.)
What kind of configuration block will manage an infrastructure object with settings specified within the block?
How does the use of Infrastructure as Code (IaC) enhance the reliability of your infrastructure?
Pick the two correct responses below.
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?
Which of the following does HCP Terraform perform during a health assessment for a workspace?
Pick the 2 correct responses below:
terraform init retrieves and caches the configuration for all remote modules.
How would you reference the volume IDs associated with the ebs_block_device blocks in this configuration?

You can configure multiple cloud blocks in your Terraform configuration to connect your workspace to both HCP Terraform and your Terraform Enterprise instance.
In a HCP Terraform/Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when you merge or commit changes to version control.
A resource block is shown in the Exhibit space of this page. How would you reference the name value of the second instance of this resource?
How can a ticket-based system slow down infrastructure provisioning and limit the ability to scale? Choose two correct answers.
It is best practice to store secret data in the same version control repository as your Terraform configuration.
What are some benefits of using Sentinel with Terraform Cloud/Terraform Cloud? Choose three correct answers.
Changing the Terraform backend from the default " local " backend to a different one after performing your first terrafom apply is:
Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.
You created infrastructure outside the Terraform workflow that you now want to manage using Terraform. Which command brings the infrastructure into Terraform state?
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?
When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)
How would you output returned values from a child module in the Terraform CLI output?
Module variable assignments are inherited from the parent module and you do not need to explicitly set them.