Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.
As a developer, you want to ensure your plugins are up to date with the latest versions. Which Terraform command should you use?
Which of the following does terraform apply change after you approve the execution plan? (Choose two.)
Infrastructure as Code (laC) can be stored in a version control system along with application code.
Only the user that generated a plan may apply it.
Why does this backend configuration not follow best practices?
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 arguments are required when declaring a Terraform output?
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?
Which command must you first run before performing further Terraform operations in a working directory?
Which of these are features of HCP Terraform/Terraform Cloud? Pick the 2 correct responses below.
Which command add existing resources into Terraform state?
Terraform configuration (including any module references) can contain only one Terraform provider type.
Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?
Which command lets you experiment with terraform expressions?
You add a new provider to your configuration and immediately run terraform apply in the CD using the local backend. Why does the apply fail?
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?
Select the command that doesn’t cause Terraform to refresh its state.
How would you output returned values from a child module in the Terraform CLI output?
Which of the following is not a key principle of infrastructure as code?
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
What is the provider for the resource shown in the Exhibit?
resource "aws_vpc" "main" {
name = "test"
}
What does this code do?
In a Terraform Cloud workpace linked to a version control repository speculative plan rum start automatically commit changes to version control.
It is best practice to store secret data in the same version control repository as your Terraform configuration.
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?
The public Terraform Module Registry is free to use.
Outside of the required_providers block, Terraform configurations always refer to providers by their local names.
Once you configure a new Terraform backend with a terraform code block, which command(s) should you use to migrate the state file?
Which of these commands makes your code more human readable?
You have provisioned some virtual machines (VMs) on Google Cloud Platform (GCP) using the gcloud command line tool. However, you are standardizing with Terraform and want to manage these VMs using Terraform instead. What are the two things you must do to achieve this? Choose two correct answers.
terraform validate reports syntax check errors for which of the following?
You can reference a resource created with for_each using a Splat ( *) expression.
In Terraform HCL, an object type of object({name=string, age-number}) would match this value.
A)
B)
C)
D)
Multiple team members are collaborating on infrastructure using Terraform and want to format the* Terraform code following standard Terraform-style convention.
How should they ensure the code satisfies conventions?
How can terraform plan aid in the development process?
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?
What is one disadvantage of using dynamic blocks in Terraform?
All standard backend types support state locking, and remote operations like plan, apply, and destroy.
How would you reference the volume IDs associated with the ebs_block_device blocks in this configuration?
What is the Terraform style convention for indenting a nesting level compared to the one above it?
Why would you use the -replace flag for terraform apply?
Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.
What kind of configuration block will create an infrastructure object with settings specified within the block?
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?
If a module declares a variable with a default, that variable must also be defined within the module.
Which of the following module source paths does not specify a remote module?
What does state looking accomplish?
You can access state stored with the local backend by using terraform_remote_state data source.
Which of these statements about HCP Terraform/Terraform Cloud workspaces is false?
What value does the Terraform Cloud private registry provide over the public Terraform Module Registry?
Which of these actions will prevent two Terraform runs from changing the same state file at the same time?
Which of the following is not a valid source path for specifying a module?
Which configuration consistency errors does terraform validate report?
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?
terraform plan updates your state file.
You can configure Terraform to log to a file using the TF_LOG environment variable.
A Terraform output that sets the "sensitive" argument to true will not store that value in the state file.