Which of the following arguments are required when declaring a Terraform output?
- Asensitive
- Bdescription
- Cdefault
- Dvalue (correct answer)
Reveal answer & explanationHide answer
The correct answer is D. Option D: value
Page 6 of 19 Β· 368 total questions.
Which of the following arguments are required when declaring a Terraform output?
The correct answer is D. Option D: value
Your risk management organization requires that new AWS S3 buckets must be private and encrypted at rest. How can Terraform Enterprise automatically and proactively enforce this security control?
The correct answer is A. Option A: With a Sentinel policy, which runs before every apply
Explanation
Sentinel evaluates policy as code against Terraform run data to enforce organizational guardrails. This option keeps traffic private / properly secured as required.
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 some 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?
The correct answer is A. Option A: Terraform will not make any changes to the load balancer and will update the state file to reflect the manual change.
Explanation
Terraform state maps resource addresses to remote objects and stores metadata needed to calculate changes efficiently.
When using Terraform to deploy resources into Azure, which scenarios are true regarding state files?
The correct answer is C. Option C: When you change a Terraform-managed resource via the Azure Cloud Console. Terraform updates the state file to reflect the change during the next plan or apply.
Explanation
Terraform state maps resource addresses to remote objects and stores metadata needed to calculate changes efficiently.
What does terraform import allow you to do?
The correct answer is C. Option C: Import provisioned infrastructure to your state file
Explanation
Terraform state maps resource addresses to remote objects and stores metadata needed to calculate changes efficiently.
How would you reference the Volume IDs associated with the ebs_block_device blocks in this configuration?

The correct answer is D. Option D: aws_instance.example.ebs_block_device.*.volume_id
What does state locking accomplish?
The correct answer is C. Option C: Blocks Terraform commands from modifying the state file
Explanation
Terraform state maps resource addresses to remote objects and stores metadata needed to calculate changes efficiently.
You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new provider?
The correct answer is B. Option B: Run terraform init -upgrade
Explanation
terraform init initializes a working directory, installs required providers and modules, and configures the backend.
A module can always refer to all variables declared in its parent module.
The correct answer is B. Option B: False
When you use a remote backend that needs authentication, HashiCorp recommends that you:
The correct answer is A. Option A: Use partial configuration to load the authentication credentials outside of the Terraform code
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 afterwards without changing any Terraform code?
The correct answer is D. Option D: Nothing This option needs the least custom development effort.
A junior admin accidentally deleted some of your cloud instances. What does Terraform do when you run terraform apply?
The correct answer is C. Option C: Rebuild only the instances that were deleted
You have created a main.tr Terraform configuration consisting of an application server, a database, and a load balancer. You ran terraform apply and all resources were created successfully. Now you realize that you do not actually need the load balancer so you run terraform destroy without any flags What will happen?
The correct answer is B. Option B: Terraform will prompt you to confirm that you want to destroy all the infrastructure
Which type of block fetches or computes information for use elsewhere in a Terraform configuration?
The correct answer is D. Option D: data
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 run first?
The correct answer is D. Option D: terraform init
Explanation
terraform init initializes a working directory, installs required providers and modules, and configures the backend.
All modules published on the official Terraform Module Registry have been verified by HashiCorp.
The correct answer is B. Option B: False
You have to initialize a Terraform backend before it can be configured.
The correct answer is B. Option B: False
Which of the following does terraform apply change after you approve the execution plan? (Choose two.)
The correct answer is A. Option A: Cloud infrastructure
A Terraform backend determines how Terraform loads state and stores updates when you execute ___________.
The correct answer is D. Option D: All of the above
What does Terraform use .terraform.lock.hcl file for?
The correct answer is A. Option A: Tracking provider dependencies
Explanation
A provider plugin implements resource types and data sources that communicate with an external API.
Showing questions 101β120 of 368 Β· Page 6 of 19