πŸ”

TA-003 β€” questions

Page 2 of 19 Β· 368 total questions.

Topic 1 Β· Question 21

You have recently started a new job at a retailer as an engineer. As part of this new role, you have been tasked with evaluating multiple outages that occurred during peak shopping time during the holiday season. Your investigation found that the team is manually deploying new compute instances and configuring each compute instance manually. This has led to inconsistent configuration between each compute instance. How would you solve this using infrastructure as code?

  • AImplement a ticketing workflow that makes engineers submit a ticket before manually provisioning and configuring a resource
  • BImplement a checklist that engineers can follow when configuring compute instances
  • CReplace the compute instance type with a larger version to reduce the number of required deployments
  • DImplement a provisioning pipeline that deploys infrastructure configurations committed to your version control system following code reviews (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Implement a provisioning pipeline that deploys infrastructure configurations committed to your version control system following code reviews

Topic 1 Β· Question 22

Which of the following locations can Terraform use as a private source for modules? (Choose two.)

  • APublic repository on GitHub.
  • BInternally hosted VCS (Version Control System) platform.
  • CPublic Terraform Registry.
  • DPrivate repository on GitHub. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Private repository on GitHub. This option keeps traffic private / properly secured as required.

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

Which two steps are required to provision new infrastructure in the Terraform workflow? (Choose two.)

  • ADestroy
  • BApply (correct answer)
  • CImport
  • DInit (correct answer)
  • EValidate
Reveal answer & explanation
Correct answer: B, D

The correct answer is B, D. Option B: Apply Option D: Init

Topic 1 Β· Question 24

You have provisioned some virtual machines (VMs) on Google Cloud Platform (GCP) using the gcloud command line tool. However, you are standardizing with Terraform and want to manage these VMs using Terraform instead. What are the two things you must do to achieve this? (Choose two.)

  • AProvision new VMs using Terraform with the same VM names.
  • BUse the terraform import command for the existing VMs.
  • CWrite Terraform configuration for the existing VMs. (correct answer)
  • DRun the terraform import-gcp command.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Write Terraform configuration for the existing VMs.

Topic 1 Β· Question 25

Terraform requires the Go runtime as a prerequisite for installation.

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

The correct answer is B. Option B: False

Topic 1 Β· Question 26

A resource block is shown in the Exhibit space of this page. How would you reference the name value of the second instance of this resource?

Exhibit 1 for question 26
  • Aaws_instance.web[1]
  • Belement(aws_instance.web, 2)
  • Caws_instance.web[2].name
  • Daws_instance.web[1].name (correct answer)
  • Eaws_instance.web.*.name
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: aws_instance.web[1].name

Topic 1 Β· Question 27

Terraform can import modules from a number of sources `" which of the following is not a valid source?

  • AFTP server (correct answer)
  • BGitHub repository
  • CLocal path
  • DTerraform Module Registry
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: FTP server

Topic 1 Β· Question 28

Which of the following is available only in Terraform Enterprise or Cloud workspaces and not in Terraform CLI?

  • ASecure variable storage (correct answer)
  • BSupport for multiple cloud providers
  • CDry runs with terraform plan
  • DUsing the workspace as a data source
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Secure variable storage

Topic 1 Β· Question 29

terraform validate validates the syntax of Terraform files.

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

The correct answer is A. Option A: True

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

You have used Terraform to create an ephemeral development environment in the cloud and are now ready to destroy all the infrastructure described by your Terraform configuration. To be safe, you would like to first see all the infrastructure that will be deleted by Terraform. Which command should you use to show all of the resources that will be deleted? (Choose two.)

  • ARun terraform plan -destroy. (correct answer)
  • BThis is not possible. You can only show resources that will be created.
  • CRun terraform state rm *.
  • DRun terraform destroy and it will first output all the resources that will be deleted before prompting for approval. (correct answer)
Reveal answer & explanation
Correct answer: A, D

The correct answer is A, D. Option A: Run terraform plan -destroy. Option D: Run terraform destroy and it will first output all the resources that will be deleted before prompting for approval.

Explanation

terraform plan compares configuration and state with real infrastructure and previews the proposed changes without applying them. terraform destroy removes infrastructure managed by the current Terraform configuration and state.

Topic 1 Β· Question 31

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

  • Aservers = num_servers
  • Bservers = variable.num_servers
  • Cservers = var(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 32

A Terraform provisioner must be nested inside a resource configuration block.

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

The correct answer is A. Option A: True

Topic 1 Β· Question 33

Terraform can run on Windows or Linux, but it requires a Server version of the Windows operating system.

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

The correct answer is B. Option B: False

Topic 1 Β· Question 34

What does the default "local" Terraform backend store?

  • Atfplan files
  • BTerraform binary
  • CProvider plugins
  • DState file (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: State file

Explanation

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

Topic 1 Β· Question 35

You have multiple team members collaborating on infrastructure as code (IaC) using Terraform, and want to apply formatting standards for readability. How can you format Terraform HCL (HashiCorp Configuration Language) code according to standard Terraform style convention?

  • ARun the terraform fmt command during the code linting phase of your CI/CD process (correct answer)
  • BDesignate one person in each team to review and format everyone's code
  • CManually apply two spaces indentation and align equal sign "=" characters in every Terraform file (*.tf)
  • DWrite a shell script to transform Terraform files using tools such as AWK, Python, and sed
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Run the terraform fmt command during the code linting phase of your CI/CD process

Explanation

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

Topic 1 Β· Question 36

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

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

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

Which task does terraform init not perform?

  • ASources all providers present in the configuration and ensures they are downloaded and available locally
  • BConnects to the backend
  • CSources any modules and copies the configuration locally
  • DValidates all required variables are present (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Validates all required variables are present

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

You have declared a variable called var.list which is a list of objects that all have an attribute id. Which options will produce a list of the IDs? (Choose two.)

  • A{ for o in var.list : o => o.id }
  • Bvar.list[*].id (correct answer)
  • C[ var.list[*].id ]
  • D[ for o in var.list : o.id ] (correct answer)
Reveal answer & explanation
Correct answer: B, D

The correct answer is B, D. Option B: var.list[*].id Option D: [ for o in var.list : o.id ]

Topic 1 Β· Question 39

Which argument(s) is (are) required when declaring a Terraform variable?

  • Atype
  • Bdefault
  • Cdescription
  • DAll of the above
  • 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 40

When using a module block to reference a module stored on the public Terraform Module Registry such as: How do you specify version 1.0.0?

Exhibit 1 for question 40
  • AModules stored on the public Terraform Module Registry do not support versioning
  • BAppend ?ref=v1.0.0 argument to the source path
  • CAdd version = "1.0.0" attribute to module block (correct answer)
  • DNothing "" modules stored on the public Terraform Module Registry always default to version 1.0.0
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Add version = "1.0.0" attribute to module block

Explanation

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

Showing questions 21–40 of 368 Β· Page 2 of 19