What does Terraform not reference when running a terraform apply -refresh-only ?
Before you can use a new backend or HCP Terraform/Terraform Cloud integration, you must first execute terraform init.
A developer launched a VM outside of the Terraform workflow and ended up with two servers with the same name. They are unsure which VM is managed with Terraform, but they do have a list of all active VM IDs. Which method could you use to determine which instance Terraform manages?
Which two steps are required to provision new infrastructure in the Terraform workflow?
(Pick the 2 correct responses below)
terraform validate uses provider APIs to verify your infrastructure settings.
Which command must you first run before performing further Terraform operations in a working directory?
Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.
What are some benefits of using Sentinel with Terraform Cloud/Terraform Cloud? Choose three correct answers.
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 can configure Terraform to log to a file using the TF_LOG environment variable.
You have provisioned some virtual machines (VMs) on Google Cloud Platform (GCP) using the gcloud command line tool. However, you are standardizing with Terraform and want to manage these VMs using Terraform instead. What are the two things you must do to achieve this? Choose two correct answers.
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?
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?
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?
A provider configuration block is required in every Terraform configuration.
Example:

You much initialize your working directory before running terraform validate.
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.
If a module declares a variable with a default, that variable must also be defined within the module.
Which of the following should you add in the required_providers block to define a provider version constraint?
The Terraform binary version and provider versions must match each other in a single configuration.
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?
Which of the following locations can Terraform use as aprivate sourcefor modules?(Pick 2 correct responses)
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?
What functionality do providers offer in Terraform?(Pick 3 correct responses)
Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.
You used Terraform to create an ephemeral development environment in the cloud 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 the resources that will be deleted? (Pick the 2 correct responses)
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.
When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)
Terraform variables and outputs that set the description argument will store that description in the state file.
A Terraform output that sets the "sensitive" argument to true will not store that value in the state file.
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 of the following module source paths does not specify a remote module?
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?
Which are forbidden actions when the terraform state file is locked? Choose three correct answers.
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.
How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
Which of these are features of Terraform Cloud? Choose two correct answers.
Which of the following is not a benefit of adopting infrastructure as code?
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 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 can develop a custom provider to manage its resources using Terraform.
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.
When you use a backend that requires authentication, it is best practice to:
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?
By default, if you do not define a backend for your configuration, where does Terraform store information about the resources that it manages?
Before you can use a remote backend, you must first execute terra-form init.
What type of block is used to construct a collection of nested configuration blocks?
What is the name of the default file where Terraform stores the state?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.
terraform init retrieves and caches the configuration for all remote modules.
Once you configure a new Terraform backend with a terraform code block, which command(s) should you use to migrate the state file?
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?