One remote backend configuration always maps to a single remote workspace.
What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?
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 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?
Which configuration consistency errors does terraform validate report?
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.
When does Terraform create the .terraform.lock.hc1 file?
You modified your Terraform configuration to fix a typo in the resource ID by renaming it from photoes to photos. What configuration will you add to update the resource ID in state without destroying the existing resource?
Original configuration:
resource "aws_s3_bucket" "photoes" {
bucket_prefix = "images"
}
Updated configuration:
resource "aws_s3_bucket" "photos" {
bucket_prefix = "images"
}
Which statement describes a goal of Infrastructure as Code (IaC)?
Which of the following is not a valid string function in Terraform?
Which of these are features of HCP Terraform/Terraform Cloud? (Pick the 2 correct responses)
Which of the following is availableonlyinHCP Terraform workspacesandnot in Terraform CLI?
Which type of block fetches or computes information for use elsewhere in a Terraform configuration?
Which of these ate features of Terraform Cloud? Choose two correct answers.
Select the command that doesn’t cause Terraform to refresh its state.
What is a Terraform provider not responsible for?
What task does the terraform import command perform?
You created infrastructure outside the Terraform workflow that you now want to manage using Terraform. Which command brings the infrastructure into Terraform state?
What feature stops multiple users from operating on the Terraform state at the same time?
Your root module contains a variable namednum_servers. Which is the correct way to pass its value to a child module with an input namedservers?
terraform validate uses provider APIs to verify your infrastructure settings.
When using multiple configuration of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?
Which command add existing resources into Terraform state?
Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.
You cannot install third party plugins using terraform init.
Terraform providers are part of the Terraform core binary.
Terraform configuration (including any module references) can contain only one Terraform provider type.
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 is not a valid source path for specifying a module?
Why would you use the -replace flag for terraform apply?
Terraform variable names are saved in the state file.
Why does this backend configuration not follow best practices?
The_________determines how Terraform creates, updates, or delete resources.
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?
What value does the Terraform Cloud private registry provide over the public Terraform Module Registry?
Which of the following is true about terraform apply?(Pick 2 correct responses)
terraform init retrieves and caches the configuration for all remote modules.
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?
HashiCorp Configuration Language (HCL) supports user-denned functions.
Which of these are features of Terraform Cloud? Choose two correct answers.
Which of the following should you add in the required_providers block to define a provider version constraint?
Terraform configuration can only import modules from the public registry.
When you include a module block in your configuration that references a module from the Terraform Registry, the "version" attribute is required.
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?
A module can always refer to all variables declared in its parent module.
Which Terraform collection type should you use to store key/value pairs?
When should you run terraform init?
How would you output returned values from a child module in the Terraform CLI output?
If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.
What is the Terraform style convention for indenting a nesting level compared to the one above it?
You can configure Terraform to log to a file using the TF_LOG environment variable.
You have never used Terraform before and would like to test it out using a shared team account for a cloud provider. The shared team account already contains 15 virtual machines (VM). You develop a Terraform configuration containing one VM. perform terraform apply, and see that your VM was created successfully. What should you do to delete the newly-created VM with Terraform?
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.
Terraformrequiresthe Go runtime as a prerequisite for installation.
What is terraform plan -refresh-only intended to detect?
You want to define a single input variable to capture configuration values for a server. The values must represent memory as a number, and the server name as a string.
Which variable type could you use for this input?
What type of information can be found on the Terraform Registry when using published modules?
When should you use the force-unlock command?
Which argument can you use toprevent unexpected updatesto a module's configuration when calling Terraform Registry modules?
Which of these actions will prevent two Terraform runs from changing the same state file at the same time?
Which command lets you experiment with terraform expressions?
A Terraform backend determines how Terraform loads state and stores updates when you execute which command?
What does this code do?
terraform { required_providers { aws = ">= 3.0" }}
Which of the following should you put into the required_providers block?
When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
Using the terraform state rm command against a resource will destroy it.
All standard backend types support state locking, and remote operations like plan, apply, and destroy.
Before you can use a new backend or HCP Terraform/Terraform Cloud integration, you must first execute terraform init.