You created infrastructure outside the Terraform workflow that you now want to manage using Terraform. Which command brings the infrastructure into Terraform state?
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 of the following is not a valid source path for specifying a module?
Which of these ate secure options for storing secrets for connecting to a Terraform remote backend? Choose two correct answers.
Which argument can you use toprevent unexpected updatesto a module's configuration when calling Terraform Registry modules?
A resource block is shown in the Exhibit space of this page. What is the Terraform resource name of the resource block?
What kind of configuration block will create an infrastructure object with settings specified within the block?
Which of the following should you add in the required_providers block to define a provider version constraint?
How can terraform plan aid in the development process?
What is a Terraform provider not responsible for?
Which of these are features of HCP Terraform/Terraform Cloud? (Pick the 2 correct responses)
Terraform configuration can only import modules from the public registry.
Which of the following is not a way to trigger terraform destroy?
Which of the following commands would you use to access all of the attributes and details of a resource managed by Terraform?
Which of these is true about Terraform's plugin-based architecture?
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?
Where does the Terraform local backend store its state?
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.
Which of the following arguments are required when declaring a Terraform output?
Which of the following methods, used to provision resources into a public cloud, demonstrates the concept of infrastructure as code?
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?
Which of the following module source paths does not specify a remote module?
Which option cannot be used to keep secrets out of Terraform configuration files?
Where can Terraform not load a provider from?
Before you can use a remote backend, you must first execute terra-form init.
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?
Which Terraform collection type should you use to store key/value pairs?
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.
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
What is the Terraform style convention for indenting a nesting level compared to the one above it?
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 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.
Which command must you first run before performing further Terraform operations in a working directory?
You much initialize your working directory before running terraform validate.
You can access state stored with the local backend by using terraform_remote_state data source.
Which command lets you experiment with terraform expressions?
What command can you run to generateDOT (Graphviz)formatted data to visualize Terraform dependencies?
When you use a remote backend that needs authentication, HashiCorp recommends that you:
Which of these commands makes your code more human readable?
It is best practice to store secret data in the same version control repository as your Terraform configuration.
A provider configuration block is required in every Terraform configuration.
Example:
Changing the Terraform backend from the default "local" backend to a different one after performing your first terrafom apply is:
When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
What does this code do?
terraform { required_providers { aws = ">= 3.0" }}
Which of the following should you put into the required_providers block?
Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?
Which command doesnotcause Terraform to refresh its state?
How would you reference the volume IDs associated with the ebs_block_device blocks in this configuration?
What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?
Which of these are benefits of using Sentinel with HCP Terraform/Terraform Cloud? (Pick the 3 correct responses)
Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into stdout.
The Terraform binary version and provider versions must match each other in a single configuration.
You cannot install third party plugins using terraform init.
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?
Why does this backend configuration not follow best practices?
What is the provider for this resource?
Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.
You can develop a custom provider to manage its resources using Terraform.
Which of the following is not a key principle of infrastructure as code?
Which of the following locations can Terraform use as aprivate sourcefor modules?(Pick 2 correct responses)
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
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?
When should you use the force-unlock command?
What does terraform import do?
What does Terraform not reference when running a terraform apply -refresh-only ?
All standard backend types support state locking, and remote operations like plan, apply, and destroy.
When you initialize Terraform, where does it cache modules from the public Terraform Registry?
How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
Where in your Terraform configuration do you specify a state backend?
In a Terraform Cloud workpace linked to a version control repository speculative plan rum start automatically commit changes to version control.
When should you run terraform init?