πŸ”

TA-003 β€” questions

Page 16 of 19 Β· 368 total questions.

Topic 1 Β· Question 308

Which option can not keep secrets out of Terraform configuration files?

  • AA shared credential file
  • BMark the variable as sensitive (correct answer)
  • CEnvironment Variables
  • DA -var flag
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Mark the variable as sensitive

Explanation

Marking a value sensitive redacts it from routine CLI output, though it can still be stored in state.

Topic 1 Β· Question 309

Which of the following is not true of Terraform providers?

  • AAn individual person can write a Terraform Provider
  • BA community of users can maintain a provider
  • CHashiCorp maintains some providers
  • DCloud providers and infrastructure vendors can write, maintain, or collaborate on Terraform providers
  • ENone of the above (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: None of the above

Topic 1 Β· Question 310

Which Terraform command checks that your configuration syntax is correct?

  • Aterraform fmt
  • Bterraform validate (correct answer)
  • Cterraform init
  • Dterraform show
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: terraform validate

Explanation

terraform validate checks configuration syntax and internal consistency without accessing remote services.

Topic 1 Β· Question 311

terraform validate uses provider APIs to verify your infrastructure settings.

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

The correct answer is B. Option B: False

Topic 1 Β· Question 312

You add a new provider to your configuration and immediately run terraform apply in the CLI using the local backend. Why does the apply fail?

  • ATerraform needs you to format your code according to best practices first
  • BTerraform requires you to manually run terraform plan first
  • CThe Terraform CLI needs you to log into Terraform Cloud first
  • DTerraform needs to install the necessary plugins first (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Terraform needs to install the necessary plugins first

Topic 1 Β· Question 313

Which of these statements about Terraform Cloud workspaces is false?

  • AThey can securely store cloud credentials
  • BThey have role-based access controls
  • CYou must use the CLI to switch between workspaces (correct answer)
  • DPlans and applies can be triggered via version control system integrations
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: You must use the CLI to switch between workspaces

Topic 1 Β· Question 314

What value does the Terraform Cloud private registry provide over the public Terraform Module Registry?

  • AThe ability to restrict modules to members of Terraform Cloud or Enterprise organizations (correct answer)
  • BThe ability to share modules publicly with any user of Terraform
  • CThe ability to tag modules by version or release
  • DThe ability to share modules with public Terraform users and members of Terraform Cloud Organizations
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: The ability to restrict modules to members of Terraform Cloud or Enterprise organizations

Explanation

A Terraform module packages related resources into a reusable configuration with defined inputs and outputs. Terraform Cloud, now HCP Terraform, provides managed remote runs, state, collaboration, policy, and governance. This option keeps traffic private / properly secured as required.

Topic 1 Β· Question 315

Terraform providers are part of the Terraform core binary.

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

The correct answer is B. Option B: False

Topic 1 Β· Question 316

Which of the following is not a benefit of adopting infrastructure as code?

  • AReusability of code
  • BAutomation
  • CGraphical User Interface (correct answer)
  • DVersioning
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Graphical User Interface

Topic 1 Β· Question 317

Where does the Terraform local backend store its state?

  • AIn the terraform.tfstate file (correct answer)
  • BIn the .terraform directory
  • CIn the terraform.tfstate directory
  • DIn the .terraform.lock.hcl file
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: In the terraform.tfstate file

Explanation

Terraform state maps resource addresses to remote objects and stores metadata needed to calculate changes efficiently.

Topic 1 Β· Question 318

Which of these is true about Terraform's plugin-based architecture?

  • ATerraform can only source providers from the internet
  • BYou can create a provider for your API if none exists (correct answer)
  • CEvery provider in a configuration has its own state file for its resources
  • DAll providers are part of the Terraform core binary
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: You can create a provider for your API if none exists

Explanation

A provider plugin implements resource types and data sources that communicate with an external API.

Topic 1 Β· Question 319

Your risk management organization requires that new AWS S3 buckets must be private and encrypted at rest. How can Terraform Cloud automatically and proactively enforce this security control?

  • AAuditing cloud storage buckets with a vulnerability scanning tool
  • BWith a Sentinel policy, which runs before every apply (correct answer)
  • CWith an S3 module with proper settings for buckets
  • DBy adding variables to each Terraform Cloud workspace to ensure these settings are always enabled
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: 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 320

If you don't use the local backend, where does Terraform save resource state?

  • AIn the remote backend or Terraform Cloud (correct answer)
  • BOn the disk
  • CIn memory
  • DIn an environment variable
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: In the remote backend or Terraform Cloud

Explanation

A Terraform backend determines where state is stored and, for supported backends, how operations and locking are performed. Terraform Cloud, now HCP Terraform, provides managed remote runs, state, collaboration, policy, and governance.

Topic 1 Β· Question 322

When does Sentinel enforce policy logic during a Terraform Cloud run?

  • ABefore the plan phase
  • BDuring the plan phase
  • CBefore the apply phase (correct answer)
  • DAfter the apply phase
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Before the apply phase

Topic 1 Β· Question 323

What is terraform refresh-only intended to detect?

  • AEmpty state files
  • BCorrupt state files
  • CTerraform configuration code changes
  • DState file drift (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: 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.

Topic 1 Β· Question 324

You should run terraform fmt to rewrite all Terraform configurations within the current working directory to conform to Terraform-style conventions.

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

The correct answer is A. Option A: True

Topic 1 Β· Question 325

Why would you use the -replace flag for terraform apply?

  • AYou want to force Terraform to destroy a resource on the next apply
  • BYou want Terraform to ignore a resource on the next apply
  • CYou want to force Terraform to destroy and recreate a resource on the next apply (correct answer)
  • DYou want Terraform to destroy all the infrastructure in your workspace
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: You want to force Terraform to destroy and recreate a resource on the next apply

Topic 1 Β· Question 326

You can configure Terraform to log to a file using the TF_LOG environment variable.

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

The correct answer is B. Option B: False

Topic 1 Β· Question 327

When does Terraform create the .terraform.lock.hcl file?

  • AAfter your first terraform plan
  • BAfter your first terraform apply
  • CAfter your first terraform init (correct answer)
  • DWhenever you enable state locking
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: After your first terraform init

Explanation

terraform init initializes a working directory, installs required providers and modules, and configures the backend.

Topic 1 Β· Question 328

You have been working in a Cloud provider account that is shared with other team members. You previously used Terraform to create a load balancer that is listening 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 terraform apply upon returning to your desk?

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

The correct answer is C. Option C: Terraform will not make any changes to the Load Balancer and will update the state file to reflect any changes made.

Explanation

Terraform state maps resource addresses to remote objects and stores metadata needed to calculate changes efficiently.

Showing questions 301–320 of 368 Β· Page 16 of 19