πŸ”

TA-003 β€” questions

Page 15 of 19 Β· 368 total questions.

Topic 1 Β· Question 288

One cloud configuration always maps to a single remote workspace.

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

The correct answer is B. Option B: False

Topic 1 Β· Question 289

Multiple team members are collaborating on infrastructure using Terraform and want to format their Terraform code following standard Terraform-style convention. How could they automatically ensure the code satisfies conventions?

  • AReplace all tabs with spaces
  • BTerraform automatically formats configuration on terraform apply
  • CRun terraform validate prior to executing terraform plan or terraform apply
  • DUse terraform fmt (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Use terraform fmt

Explanation

terraform fmt rewrites Terraform configuration into the canonical style and formatting.

Topic 1 Β· Question 290

Which backend does the Terraform CLI use by default?

  • ADepends on the cloud provider configured
  • BRemote
  • CTerraform Cloud
  • DLocal (correct answer)
  • EHTTP
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Local

Topic 1 Β· Question 291

The Terraform CLI will print output values from a child module after running terraform apply.

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

The correct answer is B. Option B: False

Topic 1 Β· Question 292

What does terraform refresh-only modify?

  • AYour cloud infrastructure
  • BYour Terraform plan
  • CYour Terraform configuration
  • DYour state file (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Your state file

Explanation

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

Topic 1 Β· Question 293

What does terraform import do?

  • AImports existing resources into the state file (correct answer)
  • BImports all infrastructure from a given cloud provider
  • CImports a new Terraform module
  • DImports clean copies of tainted resources
  • ENone of the above
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Imports existing resources into the state file

Explanation

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

Topic 1 Β· Question 294

Which of the following is the correct way to pass the value in the variable num_servers into a module with the input server?

  • Aservers = var(num_servers)
  • B$(var.num_servers)
  • Cservers = num_servers
  • Dservers = var.num_servers (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: servers = var.num_servers

Topic 1 Β· Question 295

A developer on your team is going to tear down an existing deployment managed by Terraform and deploy a new one. However, there is a server resource named aws_instance.ubuntu[1] they would like to keep. What command should they use to tell Terraform to stop managing that specific resource?

  • Aterraform destroy aws_instance.ubuntu[l]
  • Bterraform apply rm aws_instance.ubuntu[l]
  • Cterraform state rm aws_instance.ubuntu[l] (correct answer)
  • Dterraform plan rm aws_instance.ubuntu[l]
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: terraform state rm aws_instance.ubuntu[l]

Explanation

terraform state subcommands inspect and safely modify resource bindings recorded in state.

Topic 1 Β· Question 296

Before you can use a remote backend, you must first execute terraform init.

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

The correct answer is A. Option A: True

Topic 1 Β· Question 297

What does running a terraform plan do?

  • ACompares your Terraform code and local state file to the remote state file in a cloud provider and determines if any changes need to be made
  • BImports all of your existing cloud provider resources to the state file
  • CInstalls all providers and modules referenced by configuration
  • DCompares the state file to your Terraform code and determines if any changes need to be made (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Compares the state file to your Terraform code and determines if any changes need to be made

Explanation

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

Topic 1 Β· Question 298

Which of the following statements about Terraform modules is not true?

  • AModules must be publicly accessible (correct answer)
  • BYou can call the same module multiple times
  • CA module is a container for one or more resources
  • DModules can call other modules
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Modules must be publicly accessible

Explanation

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

Topic 1 Β· Question 299 Β· Select all that apply

How can a ticket-based system slow down infrastructure provisioning and limit the ability to scale? (Choose two.)

  • AEnd-users have to request infrastructure changes (correct answer)
  • BTicket based systems generate a full audit trail of the request and fulfillment process
  • CUsers can access a catalog of approved resources from drop down lists m a request form
  • DThe more resources your organization needs, the more tickets your infrastructure team has to process (correct answer)
Reveal answer & explanation
Correct answer: A, D

The correct answer is A, D. Option A: End-users have to request infrastructure changes Option D: The more resources your organization needs, the more tickets your infrastructure team has to process This option scales automatically to match demand.

Topic 1 Β· Question 300

How do you specify a module's version when publishing it to the public Terraform Module Registry?

  • AConfigure it in the module's Terraform code
  • BMention it on the module s configuration page on the Terraform Module Registry
  • CThe Terraform Module Registry does not support versioning modules
  • DTag a release in the associated repo (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Tag a release in the associated repo

Topic 1 Β· Question 301

What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?

  • Aterraform plan -refresh-only (correct answer)
  • Bterraform show -json
  • Cterraform apply -lock-false
  • Dterraform plan -target-state
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: terraform plan -refresh-only

Explanation

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

Topic 1 Β· Question 302

Which command must you first run before performing further Terraform operations in a working directory?

  • Aterraform plan
  • Bterraform workspace
  • Cterraform init (correct answer)
  • Dterraform import
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: terraform init

Explanation

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

Topic 1 Β· Question 303

Which command lets you experiment with Terraform expressions?

  • Aterraform console (correct answer)
  • Bterraform validate
  • Cterraform env
  • Dterraform test
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: terraform console

Explanation

terraform console evaluates Terraform expressions interactively using the current configuration and state.

Topic 1 Β· Question 304

What kind of configuration block will create an infrastructure object with settings specified within the block?

  • Aprovider
  • Bstate
  • Cdata
  • Dresource (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: resource

Topic 1 Β· Question 305

When do changes invoked by terraform apply take effect?

  • AAfter Terraform has updated the state file
  • BOnce the resource provider has fulfilled the request (correct answer)
  • CImmediately
  • DNone of the above are correct
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Once the resource provider has fulfilled the request

Explanation

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

Topic 1 Β· Question 306

What is the workflow for deploying new infrastructure with Terraform?

  • AWrite Terraform configuration, run terraform init to initialize the working directory or workspace, and run terraform apply (correct answer)
  • BWrite Terraform configuration, run terraform show to view proposed changes, and terraform apply to create new infrastructure
  • CWrite Terraform configuration, run terraform apply to create infrastructure, use terraform validate to confirm Terraform deployed resources correctly
  • DWrite Terraform configuration, run terraform plan to initialize the working directory or workspace, and terraform apply to create the infrastructure
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Write Terraform configuration, run terraform init to initialize the working directory or workspace, and run terraform apply

Explanation

terraform init initializes a working directory, installs required providers and modules, and configures the backend. terraform apply executes the dependency-aware changes required to make infrastructure match the configuration.

Topic 1 Β· Question 307 Β· Select all that apply

Which of these are features of Terraform Cloud? (Choose two.)

  • ARemote state storage (correct answer)
  • BA web-based user interface (UI) (correct answer)
  • CAutomatic backups
  • DAutomated infrastructure deployment visualization
Reveal answer & explanation
Correct answer: A, B

The correct answer is A, B. Option A: Remote state storage Option B: A web-based user interface (UI)

Explanation

Remote state stores shared state in a backend so teams and automation can coordinate access.

Showing questions 281–300 of 368 Β· Page 15 of 19