Which of the following should you add in the required_providers block to define a provider version constraint?
Module version is required to reference a module on the Terraform Module Registry.
Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?
The Terraform binary version and provider versions must match each other in a single configuration.
Which are forbidden actions when the terraform state file is locked? Choose three correct answers.
Which of these statements about HCP Terraform/Terraform Cloud workspaces is false?
What feature stops multiple users from operating on the Terraform state at the same time?
When you run terraform apply, the Terraform CLI will print output values from both the root module and any child modules.
A Terraform backend determines how Terraform loads state and stores updates when you execute which command?
By default, if you do not define a backend for your configuration, where does Terraform store information about the resources that it manages?
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 these are benefits of using Sentinel with HCP Terraform/Terraform Cloud? (Pick the 3 correct responses)
What is the Terraform style convention for indenting a nesting level compared to the one above it?
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)
Which of the following is not a benefit of adopting infrastructure as code?
You have a Terraform configuration that defines a single virtual machine with no references to it, You have run terraform apply to create the resource, and then removed the resource definition from your Terraform configuration file.
What will happen you run terraform apply in the working directory again?
When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.
terraform apply will fail if you have not run terraform plan first to update the plan output.
You much initialize your working directory before running terraform validate.
When you initialize Terraform, where does it cache modules from the public Terraform Registry?
You can configure Terraform to log to a file using the TF_LOG environment variable.
Terraform configuration (including any module references) can contain only one Terraform provider type.
You can develop a custom provider to manage its resources using Terraform.
Which of the following commands would you use to access all of the attributes and details of a resource managed by Terraform?
All standard backend types support state locking, and remote operations like plan, apply, and destroy.
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
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 of these are features of Terraform Cloud? Choose two correct answers.
You must use different Terraform commands depending on the cloud provider you use.
In a Terraform Cloud workpace linked to a version control repository speculative plan rum start automatically commit changes to version control.
Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.
Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into stdout.
The_________determines how Terraform creates, updates, or delete resources.
Which of the following methods, used to provision resources into a public cloud, demonstrates the concept of infrastructure as code?
If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.
Which of the following is availableonlyinHCP Terraform workspacesandnot in Terraform CLI?
Changing the Terraform backend from the default "local" backend to a different one after performing your first terrafom apply is:
Which of these actions will prevent two Terraform runs from changing the same state file at the same time?
What type of information can be found on the Terraform Registry when using published modules?
Which type of block fetches or computes information for use elsewhere in a Terraform configuration?
Your DevOps team is currently using the local backend for your Terraform configuration. You would like to move to a remote backend to store the state file in a central location. Which of the following backends would not work?
You add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The existing and new resources use the same provider. The working contains a .terraform.lock, hc1 file.
How will Terraform choose which version of the provider to use?
Before you can use a new backend or HCP Terraform/Terraform Cloud integration, you must first execute terraform init.
terraform validate uses provider APIs to verify your infrastructure settings.
terraform init retrieves and caches the configuration for all remote modules.
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs for your code. What is the best method to quickly find the IP address of the resource you deployed?
All modules published on the official Terraform Module Registry have been verified by HasihCorp.
What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?