Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.
- ATrue
- BFalse (correct answer)
Reveal answer & explanationHide answer
The correct answer is B. Option B: False
Page 3 of 19 Β· 368 total questions.
Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.
The correct answer is B. Option B: False
You decide to move a Terraform state file to Amazon S3 from another location. You write the code shown in the Exhibit space into a file called backend.tf. Which command will migrate your current state file to the new S3 backend?

The correct answer is A. Option A: terraform refresh
Which option can not be used to keep secrets out of Terraform configuration files?
The correct answer is D. Option D: secure string
You have declared a variable called var.list which is a list of objects that all have an attribute id . Which options will produce a list of the IDs? (Choose two.)
The correct answer is B. Option B: var.list[*].id
Only the user that generated a plan may apply it.
The correct answer is B. Option B: False
Examine the following Terraform configuration, which uses the data source for an AWS AMI. What value should you enter for the ami argument in the AWS instance resource?

The correct answer is C. Option C: data.aws_ami.ubuntu.id
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?
The correct answer is B. Option B: The Terraform state file only contains the one new VM. Execute terraform destroy.
Explanation
terraform destroy removes infrastructure managed by the current Terraform configuration and state. terraform state subcommands inspect and safely modify resource bindings recorded in state. Terraform state maps resource addresses to remote objects and stores metadata needed to calculate changes efficiently.
It is ____________ to change the Terraform backend from the default βlocalβ backend to a different one after performing your first terraform apply.
The correct answer is C. Option C: optional
Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into syslog.
The correct answer is B. Option B: False
Where in your Terraform configuration do you specify a state backend?
The correct answer is A. Option A: The terraform block
In Terraform 0.13 and above, outside of the required_providers block, Terraform configurations always refer to providers by their local names.
The correct answer is A. Option A: True
What command should you run to display all workspaces for the current configuration?
The correct answer is C. Option C: terraform workspace list
Explanation
Terraform CLI workspaces maintain separate state instances for the same configuration.
Which of the following is true about terraform apply? (Choose two.)
The correct answer is B, C. Option B: Depending on provider specification, Terraform may need to destroy and recreate your infrastructure resources. Option C: It only operates on infrastructure defined in the current working directory or workspace.
Explanation
A provider plugin implements resource types and data sources that communicate with an external API.
Which of these is the best practice to protect sensitive values in state files?
The correct answer is C. Option C: Enhanced remote backends
Explanation
A Terraform backend determines where state is stored and, for supported backends, how operations and locking are performed.
Which of the following is available only in HCP Terraform workspaces and not in Terraform CLI?
The correct answer is A. Option A: Secure variable storage.
How would you reference the "name" value of the second instance of this fictitious resource?

The correct answer is B. Option B: aws_instance.web[1].name
A Terraform provider is not responsible for:
The correct answer is B. Option B: Provisioning infrastructure in multiple clouds
Terraform provisioners can be added to any resource block.
The correct answer is A. Option A: True
What is terraform refresh intended to detect?
The correct answer is C. Option C: State file drift
Explanation
Terraform state maps resource addresses to remote objects and stores metadata needed to calculate changes efficiently. Infrastructure drift occurs when remote objects change outside Terraform so their real attributes differ from configuration and state.
Which parameters does terraform import require? (Choose two.)
The correct answer is C, D. Option C: Resource ID Option D: Resource address
Showing questions 41β60 of 368 Β· Page 3 of 19