Infrastructure as Code (laC) can be stored in a version control system along with application code.
Which of the following should you add in the required_providers block to define a provider version constraint?
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 should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
Which of the following is availableonlyinHCP Terraform workspacesandnot in Terraform CLI?
What kind of configuration block will create an infrastructure object with settings specified within the block?
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.
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.
Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.
terraform apply will fail if you have not run terraform plan first to update the plan output.
Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.
What type of information can be found on the Terraform Registry when using published modules?
What is the provider for the resource shown in the Exhibit?
resource "aws_vpc" "main" {
name = "test"
}
Which type of block fetches or computes information for use elsewhere in a Terraform configuration?
What information does the public Terraform Module Registry automatically expose about published modules?
If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.
When using multiple configuration of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?
You've used Terraform to deploy a virtual machine and a database. You want to replace this virtual machine instance with an identical one without affecting the database. What is the best way to achieve this using Terraform?
Which argument can you use toprevent unexpected updatesto a module's configuration when calling Terraform Registry modules?
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?
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 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 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 does terraform apply change after you approve the execution plan? (Choose two.)
The Terraform binary version and provider versions must match each other in a single configuration.
When you run terraform apply, the Terraform CLI will print output values from both the root module and any child modules.
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?
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?
By default, if you do not define a backend for your configuration, where does Terraform store information about the resources that it manages?
Which of these statements about HCP Terraform/Terraform Cloud workspaces is false?
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?
You have never used Terraform before and would like to test it out using a shared team account for a cloud provider. The shared team account already contains 15 virtual machines (VM). You develop a Terraform configuration containing one VM. perform terraform apply, and see that your VM was created successfully. What should you do to delete the newly-created VM with Terraform?
Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?
Which of these ate secure options for storing secrets for connecting to a Terraform remote backend? Choose two correct answers.
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?
You must use different Terraform commands depending on the cloud provider you use.
A provider configuration block is required in every Terraform configuration.
Example:

How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
You can reference a resource created with for_each using a Splat ( *) expression.
Which command(s) adds existing resources in a public cloud into Terraform state?