Outside of the required_providers block, Terraform configurations always refer to providers by their local names.
What kind of configuration block will create an infrastructure object with settings specified within the block?
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?
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?
Which command must you first run before performing further Terraform operations in a working directory?
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?
A Terraform backend determines how Terraform loads state and stores updates when you execute which command?
What value does the Terraform Cloud private registry provide over the public Terraform Module Registry?
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.
terraform apply will fail if you have not run terraform plan first to update the plan output.
Which of the following arguments are required when declaring a Terraform output?
How could you reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?
All modules published on the official Terraform Module Registry have been verified by HasihCorp.
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.
Which type of block fetches or computes information for use elsewhere in a Terraform configuration?
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 ate making changes to existing Terraform code to add some new infrastructure. When is the best time to run terraform validate?
You have used Terraform lo create an ephemeral development environment in the (loud 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 of the resources that mil be deleted? Choose two correct answers.
When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)
You created infrastructure outside the Terraform workflow that you now want to manage using Terraform. Which command brings the infrastructure into Terraform state?
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?
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 Terraform output that sets the "sensitive" argument to true will not store that value in the state file.
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?
Terraform variables and outputs that set the description argument will store that description in the state file.
When using multiple configuration of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?
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?
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)
Which of the following does terraform apply change after you approve the execution plan? (Choose two.)
Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.
Before you can use a new backend or HCP Terraform/Terraform Cloud integration, you must first execute terraform init.
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?
If a module declares a variable with a default, that variable must also be defined within the module.
Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.
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.
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.
Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?
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?
terraform apply is failing with the following error. What next step should you take to determine the root cause of the problem?
Error:
yaml
CopyEdit
Error loading state: AccessDenied: Access Denied
status code: 403, request id: 288766CE5CCA24A0, host id: web.example.com
Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?
What feature stops multiple users from operating on the Terraform state at the same time?