πŸ”

TA-003 β€” questions

Page 6 of 19 Β· 368 total questions.

Topic 1 Β· Question 103

Which of the following arguments are required when declaring a Terraform output?

  • Asensitive
  • Bdescription
  • Cdefault
  • Dvalue (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: value

Topic 1 Β· Question 104

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?

  • AWith a Sentinel policy, which runs before every apply (correct answer)
  • BBy adding variables to each TFE workspace to ensure these settings are always enabled
  • CWith an S3 module with proper settings for buckets
  • DAuditing cloud storage buckets with a vulnerability scanning tool
Reveal answer & explanation
Correct answer: A

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.

Topic 1 Β· Question 105

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?

  • ATerraform will not make any changes to the load balancer and will update the state file to reflect the manual change. (correct answer)
  • BTerraform will fail with an error because the state file is no longer accurate.
  • CTerraform will change the load balancer port to 80, and then change it back to 443.
  • DTerraform will recreate the load balancer.
Reveal answer & explanation
Correct answer: A

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.

Topic 1 Β· Question 106

When using Terraform to deploy resources into Azure, which scenarios are true regarding state files?

  • AChanging resources via the Azure Cloud Console records the change in the current state file.
  • BWhen you change a resource via the Azure Cloud Console. Terraform records the changes in a new state file.
  • CWhen 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. (correct answer)
  • DChanging resources via the Azure Cloud Console does not update current state file.
Reveal answer & explanation
Correct answer: C

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.

Topic 1 Β· Question 107

What does terraform import allow you to do?

  • AImport a new Terraform module
  • BUse a state file to import infrastructure to the cloud
  • CImport provisioned infrastructure to your state file (correct answer)
  • DImport an existing state file to a new Terraform workspace
Reveal answer & explanation
Correct answer: C

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.

Topic 1 Β· Question 109

How would you reference the Volume IDs associated with the ebs_block_device blocks in this configuration?

Exhibit 1 for question 109
  • Aaws_instance.example.ebs_block_device.[*].volume_id
  • Baws_instance.example.ebs_block_device.volume_id
  • Caws_instance.example.ebs_block_device[sda2,sda3].volume_id
  • Daws_instance.example.ebs_block_device.*.volume_id (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: aws_instance.example.ebs_block_device.*.volume_id

Topic 1 Β· Question 110

What does state locking accomplish?

  • ACopies the state file from memory to disk
  • BEncrypts any credentials stored within the state file
  • CBlocks Terraform commands from modifying the state file (correct answer)
  • DPrevents accidental deletion of the state file
Reveal answer & explanation
Correct answer: C

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.

Topic 1 Β· Question 111

You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new provider?

  • ARun terraform apply -upgrade
  • BRun terraform init -upgrade (correct answer)
  • CRun terraform refresh
  • DUpgrade your version of Terraform
Reveal answer & explanation
Correct answer: B

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.

Topic 1 Β· Question 112

A module can always refer to all variables declared in its parent module.

  • ATrue
  • BFalse (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: False

Topic 1 Β· Question 113

When you use a remote backend that needs authentication, HashiCorp recommends that you:

  • AUse partial configuration to load the authentication credentials outside of the Terraform code (correct answer)
  • BPush your Terraform configuration to an encrypted git repository
  • CWrite the authentication credentials in the Terraform configuration files
  • DKeep the Terraform configuration files in a secret store
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use partial configuration to load the authentication credentials outside of the Terraform code

Topic 1 Β· Question 114

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?

  • ATerraform will terminate and recreate the VM
  • BTerraform will create another duplicate VM
  • CTerraform will apply the VM to the state file
  • DNothing (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Nothing This option needs the least custom development effort.

Topic 1 Β· Question 115

A junior admin accidentally deleted some of your cloud instances. What does Terraform do when you run terraform apply?

  • ABuild a completely brand new set of infrastructure
  • BTear down the entire workspace infrastructure and rebuild it
  • CRebuild only the instances that were deleted (correct answer)
  • DStop and generate an error message about the missing instances
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Rebuild only the instances that were deleted

Topic 1 Β· Question 116

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?

  • ATerraform will destroy the application server because it is listed first in the code
  • BTerraform will prompt you to confirm that you want to destroy all the infrastructure (correct answer)
  • CTerraform will destroy the main.tf file
  • DTerraform will prompt you to pick which resource you want to destroy
  • ETerraform will immediately destroy all the infrastructure
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Terraform will prompt you to confirm that you want to destroy all the infrastructure

Topic 1 Β· Question 117

Which type of block fetches or computes information for use elsewhere in a Terraform configuration?

  • Aprovider
  • Bresource
  • Clocal
  • Ddata (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: data

Topic 1 Β· Question 118

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?

  • Aterraform apply
  • Bterraform plan
  • Cterraform show
  • Dterraform init (correct answer)
Reveal answer & explanation
Correct answer: D

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.

Topic 1 Β· Question 119

All modules published on the official Terraform Module Registry have been verified by HashiCorp.

  • ATrue
  • BFalse (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: False

Topic 1 Β· Question 120

You have to initialize a Terraform backend before it can be configured.

  • ATrue
  • BFalse (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: False

Topic 1 Β· Question 121

Which of the following does terraform apply change after you approve the execution plan? (Choose two.)

  • ACloud infrastructure (correct answer)
  • BThe .terraform directory
  • CThe execution plan
  • DState file
  • ETerraform code
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Cloud infrastructure

Topic 1 Β· Question 122

A Terraform backend determines how Terraform loads state and stores updates when you execute ___________.

  • Aapply
  • Btaint
  • Cdestroy
  • DAll of the above (correct answer)
  • ENone of the above
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: All of the above

Topic 1 Β· Question 123

What does Terraform use .terraform.lock.hcl file for?

  • ATracking provider dependencies (correct answer)
  • BThere is no such file
  • CPreventing Terraform runs from occurring
  • DStoring references to workspaces which are locked
Reveal answer & explanation
Correct answer: A

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