🔍

TA-003 — questions

Page 10 of 19 · 368 total questions.

Topic 1 · Question 184

Open source Terraform can only import publicly-accessible and open-source modules.

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

The correct answer is B. Option B: False

Topic 1 · Question 185

What does terraform destroy do?

  • ADestroy all infrastructure in the Terraform state file (correct answer)
  • BDestroy all Terraform code files in the current directory while leaving the state file intact
  • CDestroy all infrastructure in the configured Terraform provider
  • DDestroy the Terraform state file while leaving infrastructure intact
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Destroy all infrastructure in the Terraform state file

Explanation

terraform state subcommands inspect and safely modify resource bindings recorded in state. Terraform state maps resource addresses to remote objects and stores metadata needed to calculate changes efficiently.

Topic 1 · Question 186

While attempting to deploy resources into your cloud provider using Terraform, you begin to see some odd behavior and experience sluggish responses. In order to troubleshoot you decide to turn on Terraform debugging. Which environment variables must be configured to make Terraform's logging more verbose?

  • ATF_LOG_LEVEL
  • BTF_LOG_FILE
  • CTF_LOG (correct answer)
  • DTP_LOG_PATH
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: TF_LOG

Topic 1 · Question 187

If a DevOps team adopts AWS CloudFormation as their standardized method for provisioning public cloud resources, which of the following scenarios poses a challenge for this team?

  • AThe team is asked to build a reusable code base that can deploy resources into any AWS region
  • BThe team is asked to manage a new application stack built on AWS-native services
  • CThe organization decides to expand into Azure and wishes to deploy new infrastructure using their existing codebase (correct answer)
  • DThe DevOps team is tasked with automating a manual provisioning process
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: The organization decides to expand into Azure and wishes to deploy new infrastructure using their existing codebase

Topic 1 · Question 188

You cannot install third party plugins using terraform init.

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

The correct answer is B. Option B: False

Topic 1 · Question 189 · Select all that apply

Which of the following can you do with terraform plan? (Choose two.)

  • ASave a generated execution plan to apply later (correct answer)
  • BExecute a plan in a different workspace
  • CView the execution plan and check if the changes match your expectations (correct answer)
  • DSchedule Terraform to run at a planned time in the future
Reveal answer & explanation
Correct answer: A, C

The correct answer is A, C. Option A: Save a generated execution plan to apply later Option C: View the execution plan and check if the changes match your expectations

Topic 1 · Question 190 · Select all that apply

Which are examples of infrastructure as code? (Choose two.)

  • ACloned virtual machine images
  • BChange management database records
  • CVersioned configuration files (correct answer)
  • DDocker files (correct answer)
Reveal answer & explanation
Correct answer: C, D

The correct answer is C, D. Option C: Versioned configuration files Option D: Docker files

Topic 1 · Question 192 · Select all that apply

When using a module from the public Terraform Module Registry, the following parameters are required attributes in the module block. (Choose two.)

  • AEach of the module’s required inputs (correct answer)
  • BThe module’s source address (correct answer)
  • CTerraform Module Registry account token
  • DEach of the module’s dependencies (example: submodules)
  • EThe version of the module
Reveal answer & explanation
Correct answer: A, B

The correct answer is A, B. Option A: Each of the module’s required inputs Option B: The module’s source address

Explanation

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

Topic 1 · Question 193

As a developer, you want to ensure your plugins are up to date with the latest versions. Which Terraform command should you use?

  • Aterraform init -upgrade (correct answer)
  • Bterraform apply -upgrade
  • Cterraform refresh -upgrade
  • Dterraform providers -upgrade
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: terraform init -upgrade

Explanation

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

Topic 1 · Question 194

You can access state stored with the local backend by using the terraform_remote_state data source.

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

The correct answer is A. Option A: True

Topic 1 · Question 195

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 change the port back to 80 in your code.
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.

Topic 1 · Question 196

In a Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when you merge or commit changes to version control.

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

The correct answer is A. Option A: True

Topic 1 · Question 197 · Select all that apply

You have some Terraform code and a variable definitions file named dev.auto.tfvars that you tested successfully in the dev environment. You want to deploy the same code in the staging environment with a separate variable definition file and a separate state file. Which two actions should you perform? (Choose two.)

  • ACopy the existing terraform.tfstate file and save it as staging.terraform.tfstate
  • BWrite a new staging.auto.tfvars variable definition file and run Terraform with the var-file=”staging.auto.tfvars” flag (correct answer)
  • CCreate a new Terraform workspace for staging (correct answer)
  • DCreate a new Terraform provider for staging
  • EAdd new Terraform code (*.tf files) for staging in the same directory
Reveal answer & explanation
Correct answer: B, C

The correct answer is B, C. Option B: Write a new staging.auto.tfvars variable definition file and run Terraform with the var-file=”staging.auto.tfvars” flag Option C: Create a new Terraform workspace for staging

Explanation

Terraform CLI workspaces maintain separate state instances for the same configuration.

Topic 1 · Question 198

The ________ determines how Terraform creates, updates, or deletes resources.

  • ATerraform configuration
  • BTerraform core
  • CTerraform provider (correct answer)
  • DTerraform provisioner
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Terraform provider

Explanation

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

Topic 1 · Question 199

Terraform destroy is the only way to remove infrastructure.

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

The correct answer is B. Option B: False

Topic 1 · Question 200

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

  • Aservers - var.num_servers (correct answer)
  • Bservers - num_servers
  • Cservers - var(num_servers)
  • D$(var.num_servers)
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: servers - var.num_servers

Topic 1 · Question 201

Which of the fallowing commands would you use to access all of the attributes and details of a resource managed by Terraform?

  • Aterraform state list
  • Bterraform state show (correct answer)
  • Cterraform get
  • Dterraform state list
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: terraform state show

Explanation

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

Topic 1 · Question 202

How would you be able to reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?

Exhibit 1 for question 202
  • Adata.dc.id
  • Bdata.vsphere_datacenter.dc
  • Cvsphere_datacenter.dc.id
  • Ddata.vsphere_datacenter.dc.id (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: data.vsphere_datacenter.dc.id

Topic 1 · Question 203

You decide to move a Terraform state file to Amazon S3 from another location. You write the code below into a file called backend.tf. Which command will migrate your current state file to the new S3 remote backend?

Exhibit 1 for question 203
  • Aterraform state
  • Bterraform init (correct answer)
  • Cterraform refresh
  • Dterraform push
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: terraform init

Explanation

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

Topic 1 · Question 204

You want to tag multiple resources with a string that is a combination of a generated random_id and a variable. How should you use the same value in all these resources without repeating the random_id and variable in each resource?

  • ALocal values (correct answer)
  • BData source
  • CModules
  • DOutputs
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Local values

Explanation

A local value names and reuses an expression within a module without exposing it as an input or output.

Showing questions 181200 of 368 · Page 10 of 19