Multiple team members are collaborating on infrastructure using Terraform and want to format the* Terraform code following standard Terraform-style convention.
How should they ensure the code satisfies conventions?
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)
Which of the following should you add in the required_providers block to define a provider version constraint?
You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new provider?
What type of information can be found on the Terraform Registry when using published modules?
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?
Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?
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?
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.
When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)
Which of these ate secure options for storing secrets for connecting to a Terraform remote backend? Choose two correct answers.
How do you specify a module’s version when publishing it to the public terraform Module Registry?
What are some benefits of using Sentinel with Terraform Cloud/Terraform Cloud? Choose three correct answers.
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)
In a Terraform Cloud workpace linked to a version control repository speculative plan rum start automatically commit changes to version control.
As a member of an operations team that uses infrastructure as code (lac) practices, you are tasked with making a change to an infrastructure stack running in a public cloud. Which pattern would follow laC best practices for making a change?
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?
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.
What type of block is used to construct a collection of nested configuration blocks?
How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
You add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The existing and new resources use the same provider. The working contains a .terraform.lock, hc1 file.
How will Terraform choose which version of the provider to use?
The HCP Terraform private registry keeps the module configurations confidential within your organization.
Changing the Terraform backend from the default " local " backend to a different one after performing your first terrafom apply is:
When you initialize Terraform, where does it cache modules from the public Terraform Registry?
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?
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?
Which of the following methods, used to provision resources into a public cloud, demonstrates the concept of infrastructure as code?
Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?
Which command(s) adds existing resources in a public cloud into Terraform state?
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?
All modules published on the official Terraform Module Registry have been verified by HasihCorp.
If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.
A developer on your team is going to 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?
All standard backend types support state locking, and remote operations like plan, apply, and destroy.
If you don’t use the local Terraform backend, where else can Terraform save resource state?
Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.
When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
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?
By default, if you do not define a backend for your configuration, where does Terraform store information about the resources that it manages?
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.
You have a saved execution plan containing desired changes for infrastructure managed by Terraform. After running terraform apply my.tfplan, you receive the error shown. How can you apply the desired changes? (Pick the 2 correct responses below.)
You must use different Terraform commands depending on the cloud provider you use.
Which two steps are required to provision new infrastructure in the Terraform workflow? (Pick the 2 correct responses below.)
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?
terraform apply will fail if you have not run terraform plan first to update the plan output.
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.
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?
What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?
A resource block is shown in the Exhibit section of this page. How would you reference the attribute name of this resource in HCL?
What does Terraform not reference when running a terraform apply -refresh-only ?
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?
A Terraform output that sets the " sensitive " argument to true will not store that value in the state file.
Which of these actions will prevent two Terraform runs from changing the same state file at the same time?
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?
You have developed a new cloud-based service that uses proprietary APIs and want to use Terraform to create, manage, and delete users from the service. How can Terraform interact with the service?
Which of the following can you do with terraform plan?
Pick the two correct responses below.
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.
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.
Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.
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)?
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?