A Terraform local value can reference other Terraform local values.
- ATrue (correct answer)
- BFalse
Reveal answer & explanationHide answer
The correct answer is A. Option A: True
Page 4 of 19 Β· 368 total questions.
A Terraform local value can reference other Terraform local values.
The correct answer is A. Option A: True
Which of the following is not a valid Terraform collection type?
The correct answer is C. Option C: tree
When running the command terraform taint against a managed resource you want to force recreation upon, Terraform will immediately destroy and recreate the resource.
The correct answer is B. Option B: False
All standard backend types support state storage, locking, and remote operations like plan, apply and destroy.
The correct answer is B. Option B: False
How can terraform plan aid in the development process?
The correct answer is A. Option A: Validates your expectations against the execution plan without permanently modifying state
You would like to reuse the same Terraform configuration for your development and production environments with a different state file for each. Which command would you use?
The correct answer is B. Option B: terraform workspace
Explanation
Terraform CLI workspaces maintain separate state instances for the same configuration.
What is the name assigned by Terraform to reference this resource?

The correct answer is B. Option B: main
You're building a CI/CD (continuous integration/ continuous delivery) pipeline and need to inject sensitive variables into your Terraform run. How can you do this safely?
The correct answer is A. Option A: Pass variables to Terraform with a ""var flag
Your security team scanned some Terraform workspaces and found secrets stored in a plaintext in state files. How can you protect sensitive data stored in Terraform state files?
The correct answer is B. Option B: Store the state in an encrypted backend
Explanation
A Terraform backend determines where state is stored and, for supported backends, how operations and locking are performed. This option keeps traffic private / properly secured as required.
In contrast to Terraform Open Source, when working with Terraform Enterprise and Cloud Workspaces, conceptually you could think about them as completely separate working directories.
The correct answer is A. Option A: True
You want to know from which paths Terraform is loading providers referenced in your Terraform configuration (*.tf files). You need to enable debug messages to find this out. Which of the following would achieve this?
The correct answer is A. Option A: Set the environment variable TF_LOG=TRACE
How is terraform import run?
The correct answer is D. Option D: By an explicit call
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 delete the VM using the cloud provider console, and run terraform apply again without changing any Terraform code?
The correct answer is D. Option D: Terraform will recreate the VM This option needs the least custom development effort.
Which of these options is the most secure place to store secrets foe connecting to a Terraform remote backend?
The correct answer is A. Option A: Defined in Environment variables This option keeps traffic private / properly secured as required.
Your DevOps team is currently using the local backend for your Terraform configuration. You would like to move to a remote backend to begin storing the state file in a central location. Which of the following backends would not work?
The correct answer is C. Option C: Git
Which backend does the Terraform CLI use by default?
The correct answer is D. Option D: Local
When you initialize Terraform, where does it cache modules from the public Terraform Module Registry?
The correct answer is C. Option C: On disk in the .terraform sub-directory
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, then removed the resource definition from your Terraform configuration file. What will happen when you run terraform apply in the working directory again?
The correct answer is A. Option A: Terraform will destroy the virtual machine.
What features stops multiple admins from changing the Terraform state at the same time?
The correct answer is D. Option D: State locking
Explanation
State locking prevents concurrent operations from writing conflicting state changes.
A fellow developer on your team is asking for some help in refactoring their Terraform code. As part of their application's architecture, they are going to tear down an existing deployment managed by Terraform and deploy new. However, there is a server resource named aws_instance.ubuntu[1] they would like to keep to perform some additional analysis. What command should be used to tell Terraform to no longer manage the resource?
The correct answer is B. Option B: terraform state rm aws_instance.ubuntu[1]
Explanation
terraform state subcommands inspect and safely modify resource bindings recorded in state.
Showing questions 61β80 of 368 Β· Page 4 of 19