Module version is required to reference a module on the Terraform Module Registry.
terraform validate reports syntax check errors for which of the following?
As a developer, you want to ensure your plugins are up to date with the latest versions. Which Terraform command should you use?
Using the terraform state rm command against a resource will destroy it.
Which of these commands makes your code more human readable?
A terraform apply can not _________ infrastructure.
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?
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?
You can access state stored with the local backend by using terraform_remote_state data source.
What is one disadvantage of using dynamic blocks in Terraform?
What is the provider for this resource?
What is the name of the default file where Terraform stores the state?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.
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 command add existing resources into Terraform state?
Before you can use a remote backend, you must first execute terra-form init.
What is terraform plan -refresh-only intended to detect?
Which of the following is not a valid source path for specifying a module?
terraform validate confirms that your infrastructure matches the Terraform state file.
Terraform variable names are saved in the state file.
Which of these ate secure options for storing secrets for connecting to a Terraform remote backend? Choose two correct answers.
What is the provider for the resource shown in the Exhibit?
resource "aws_vpc" "main" {
name = "test"
}
Which of these actions are forbidden when the Terraform state file is locked? (Pick the 3 correct responses)
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?
A provider configuration block is required in every Terraform configuration.
Example:
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?
You should run terraform fnt to rewrite all Terraform configurations within the current working directory to conform to Terraform-style conventions.
How can terraform plan aid in the development process?
In a Terraform Cloud workpace linked to a version control repository speculative plan rum start automatically commit changes to version control.
Module variable assignments are inherited from the parent module and you do not need to explicitly set them.
What does Terraform use the .terraform.lock.hc1 file for?
Which Terraform command checks that your configuration syntax is correct?
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.
terraform init creates an example main.tf file in the current directory.
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 ate features of Terraform Cloud? Choose two correct answers.
How can a ticket-based system slow down infrastructure provisioning and limit the ability to scale? Choose two correct answers.
Infrastructure as Code (laC) can be stored in a version control system along with application code.
All modules published on the official Terraform Module Registry have been verified by HasihCorp.
How would you reference the volume IDs associated with the ebs_block_device blocks in this configuration?
What feature stops multiple users from operating on the Terraform state at the same time?
If a DevOps team adopts AWS CloudFormation as their standardized method for provisioning public cloud resoruces, which of the following scenarios poses a challenge for this team?
You have a list of numbers that represents the number of free CPU cores on each virtual cluster:
numcpus = [ 18, 3, 7, 11, 2 ]
What Terraform function could you use to select the largest number from the list?
A module can always refer to all variables declared in its parent module.
All standard backend types support state locking, and remote operations like plan, apply, and destroy.
You can configure Terraform to log to a file using the TF_LOG environment variable.
Where can Terraform not load a provider from?
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)
What is modified when executing Terraform inrefresh-only mode?
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.
A Terraform provider is NOT responsible for:
Which of these statements about Terraform Cloud workspaces is false?
You can reference a resource created with for_each using a Splat ( *) expression.
The Terraform binary version and provider versions must match each other in a single configuration.
What does state looking accomplish?
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
Which of the following is true about terraform apply?(Pick 2 correct responses)
Which statement describes a goal of Infrastructure as Code (IaC)?
What is the Terraform style convention for indenting a nesting level compared to the one above it?
What are some benefits of using Sentinel with Terraform Cloud/Terraform Cloud? Choose three correct answers.
Which of these are features of HCP Terraform/Terraform Cloud? Pick the 2 correct responses below.
How does the Terraform cloud integration differ from other state backends such as S3, Consul,etc?
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?
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.
The public Terraform Module Registry is free to use.
terraform destroy is the only way to remove infrastructure.
When does Terraform create the .terraform.lock.hc1 file?
When should you run terraform init?