When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
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?
Which provider authentication method prevents credentials from being stored in the state file?
What is a key benefit of the Terraform state file?
Changing the Terraform backend from the default "local" backend to a different one after performing your first terrafom apply is:
You must use different Terraform commands depending on the cloud provider you use.
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
When does Terraform create the .terraform.lock.hc1 file?
Define the purpose of state in Terraform.
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?
A Terraform output that sets the "sensitive" argument to true will not store that value in the state file.
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 validate reports syntax check errors for which of the following?
Which of these statements about Terraform Cloud workspaces is false?
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)
How does Terraform determine dependencies between resources?
What value does the Terraform Cloud private registry provide over the public Terraform Module Registry?
Which of these is true about Terraform's plugin-based architecture?
Which of these are features of HCP Terraform/Terraform Cloud? Pick the 2 correct responses below.
How is terraform import run?
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?
What is the workflow for deploying new infrastructure with Terraform?
What are some benefits of using Sentinel with Terraform Cloud/Terraform Cloud? Choose three correct answers.
Which of the following statements about Terraform modules is not true?
Which type of block fetches or computes information for use elsewhere in a Terraform configuration?
What is one disadvantage of using dynamic blocks in Terraform?
If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.
You should run terraform fnt to rewrite all Terraform configurations within the current working directory to conform to Terraform-style conventions.
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?
Which Terraform command checks that your configuration syntax is correct?
When using a remote backend or terraform Cloud integration, where does Terraform save resource sate?
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?
Where does the Terraform local backend store its state?
When you use a remote backend that needs authentication, HashiCorp recommends that you:
Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?
Module variable assignments are inherited from the parent module and you do not need to explicitly set them.
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 of the following should you put into the required_providers block?
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?
A module can always refer to all variables declared in its parent module.
Which of these are benefits of using Sentinel with HCP Terraform/Terraform Cloud? (Pick the 3 correct responses)
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?
A terraform apply can not _________ infrastructure.
Terraform encrypts sensitive values stored in your state file.
terraform plan updates your state file.
Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.
All standard backend types support state locking, and remote operations like plan, apply, and destroy.
Which configuration consistency errors does terraform validate report?
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)
Before you can use a remote backend, you must first execute terra-form init.
Terraform variable names are saved in the state file.
One remote backend configuration always maps to a single remote workspace.
How does Terraform manage most dependencies between resources?
Why would you use the -replace flag for terraform apply?
terraform validate confirms that your infrastructure matches the Terraform state file.
What information does the public Terraform Module Registry automatically expose about published modules?
Which of the following is not a key principle of infrastructure as code?
You can access state stored with the local backend by using terraform_remote_state data source.