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?
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 are using a networking module in your Terraform configuration with the name label my-network. In your main configuration you have the following code:
When you run terraform validate, you get the following error:
What must you do to successfully retrieve this value from your networking module?
Which argument can you use toprevent unexpected updatesto a module's configuration when calling Terraform Registry modules?
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?
In a Terraform Cloud workpace linked to a version control repository speculative plan rum start automatically commit changes to version control.
Which of the following isnotan advantage of using Infrastructure as Code (IaC) operations?
What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?
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.
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?
When you run terraform apply, the Terraform CLI will print output values from both the root module and any child modules.
Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.
Terraform configuration (including any module references) can contain only one Terraform provider type.
Which of these actions will prevent two Terraform runs from changing the same state file at the same time?
All modules published on the official Terraform Module Registry have been verified by HasihCorp.
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?
When you use a remote backend that needs authentication, HashiCorp recommends that you:
A provider configuration block is required in every Terraform configuration.
Example:

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?
Which method for sharing Terraform configurations fulfills the following criteria:
1. Keeps the configurations confidential within your organization
2. Support Terraform’s semantic version constrains
3. Provides a browsable directory
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?
You add a new provider to your configuration and immediately run terraform apply in the CD using the local backend. Why does the apply fail?
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 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)
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?
A resource block is shown in the Exhibit section of this page. How would you reference the attribute name of this resource in HCL?
Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?
Module variable assignments are inherited from the parent module and you do not need to explicitly set them.
terraform apply will fail if you have not run terraform plan first to update the plan output.
You can reference a resource created with for_each using a Splat ( *) expression.
Which of the following can you do with terraform plan? (Pick 2 correct responses)
A developer on your team is going lo 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?
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.
What does Terraform not reference when running a terraform apply -refresh-only ?
You can configure Terraform to log to a file using the TF_LOG environment variable.
Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?
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?
It is best practice to store secret data in the same version control repository as your Terraform configuration.
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?
What is the Terraform style convention for indenting a nesting level compared to the one above it?