🔍

TA-003 — questions

Page 11 of 19 · 368 total questions.

Topic 1 · Question 205

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

  • AInterpolation (correct answer)
  • BReusability of code
  • CVersioning
  • DAutomation
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Interpolation

Topic 1 · Question 206

Module version is required to reference a module on the Terraform Module Registry.

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

The correct answer is B. Option B: False

Topic 1 · Question 207

While deploying a virtual machine, the first launch user_data script fails due to race condition with another resource deployed during the same Terraform run. What is the least disruptive method to correct the issue?

  • ARun terraform taint against the virtual machine’s resource name, then terraform apply (correct answer)
  • BRestart the virtual machine from the cloud portal
  • CRun terraform apply again
  • DRun terraform destroy then terraform apply
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Run terraform taint against the virtual machine’s resource name, then terraform apply

Explanation

terraform apply executes the dependency-aware changes required to make infrastructure match the configuration.

Topic 1 · Question 208

The public Module Registry is free to use.

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

The correct answer is A. Option A: True

Topic 1 · Question 209

Both Terraform Cloud and Terraform Enterprise support policy as code (Sentinel).

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

The correct answer is A. Option A: True

Topic 1 · Question 210

You want to define multiple data disks as nested blocks inside the resource block for a virtual machine. What Terraform feature would help you define the blocks using the values in a variable?

  • ALocal values
  • BCollection functions
  • CDynamic blocks (correct answer)
  • DCount arguments
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Dynamic blocks

Explanation

A dynamic block programmatically generates repeatable nested blocks from a collection.

Topic 1 · Question 211

Which of the following module source paths does not specify a remote module?

  • Asource = “./modules/consul” (correct answer)
  • Bsource = “[email protected]:hashicorp/example.git”
  • Csource = “github.com/hashicorp/example”
  • Dsource = “hashicorp/consul/aws”
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: source = “./modules/consul”

Explanation

A Terraform module packages related resources into a reusable configuration with defined inputs and outputs.

Topic 1 · Question 212

You have a list of numbers that represents the number of free CPU cores on each virtual cluster: numcpus = [ 18, 3, 7, 11, 2 ] What Terraform function could you use to select the largest number from the list?

  • Amax(numcpus) (correct answer)
  • Bceil(numcpus)
  • Ctop(numcpus)
  • Dhigh[numcpus]
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: max(numcpus)

Topic 1 · Question 213

Variables declared within a module are accessible outside of the module.

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

The correct answer is B. Option B: False

Topic 1 · Question 214

Which of the following is not a valid Terraform variable type?

  • Alist
  • Bmap
  • Carray (correct answer)
  • Dstring
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: array

Topic 1 · Question 215

What is a key benefit of the Terraform state file?

  • AA state file can be used to schedule recurring infrastructure tasks
  • BA state file represents a source of truth for resources provisioned with a public cloud console
  • CA state file represents the desired state expressed by the Terraform code files
  • DA state file represents a source of truth for resources provisioned with Terraform (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: A state file represents a source of truth for resources provisioned with Terraform

Explanation

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

Topic 1 · Question 216

Which of these statements about Terraform Enterprise workspaces is false?

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

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

Topic 1 · Question 217

Define the purpose of state in Terraform.

  • AState is used to map real world resources to your configuration and keep track of metadata (correct answer)
  • BState is a method of codifying the dependencies of related resources
  • CState is used to enforce resource configurations that relate to compliance policies
  • DState is used to store variables and quickly reuse existing code
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: State is used to map real world resources to your configuration and keep track of metadata

Topic 1 · Question 218

Which backend does the Terraform CLI use by default?

  • AAPI
  • BRemote
  • CTerraform Cloud
  • DLocal (correct answer)
  • EHTTP
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Local

Topic 1 · Question 219

Using the terraform state rm command against a resource will destroy it.

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

The correct answer is B. Option B: False

Topic 1 · Question 220

Which method for sharing Terraform configurations keeps them confidential within your organization, supports Terraform’s semantic version constraints, and provides a browsable directory?

  • AGeneric git repository
  • BTerraform Cloud/Terraform Enterprise private module registry (correct answer)
  • CPublic Terraform Module Registry
  • DSubfolder within a workspace
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Terraform Cloud/Terraform Enterprise private module registry

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.

Topic 1 · Question 222

How would you refer to the indexing instance from the below configuration?

Exhibit 1 for question 222
  • Aaws_instance[“web”][“indexing”]
  • Baws_instance.web.indexing
  • Caws_instance-web[“indexing”]
  • Daws_instance.web[“indexing”] (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: aws_instance.web[“indexing”]

Topic 1 · Question 223

Which feature is not included in Terraform Cloud’s free tier?

  • AWorkspace
  • BRemote state management
  • CAudit logging (correct answer)
  • DPrivate module registry
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Audit logging

Topic 1 · Question 224

When should you run terraform init?

  • AAfter you run terraform apply for the first time in a new Terraform project and before you run terraform plan
  • BAfter you run terraform plan for the first time in a new Terraform project and before you run terraform apply
  • CAfter you start coding a new Terraform project and before you run terraform plan for the first time (correct answer)
  • DBefore you start coding a new Terraform project
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: After you start coding a new Terraform project and before you run terraform plan for the first time

Explanation

terraform plan compares configuration and state with real infrastructure and previews the proposed changes without applying them.

Topic 1 · Question 225

Terraform configuration (including any module references) can contain only one Terraform provider type.

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

The correct answer is B. Option B: False

Showing questions 201220 of 368 · Page 11 of 19