πŸ”

TA-003 β€” questions

Page 3 of 19 Β· 368 total questions.

Topic 1 Β· Question 41

Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.

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

The correct answer is B. Option B: False

Topic 1 Β· Question 42

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

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

The correct answer is A. Option A: terraform refresh

Topic 1 Β· Question 43

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

  • AA Terraform provider
  • BEnvironment variables
  • CA -var flag
  • Dsecure string (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: secure string

Topic 1 Β· Question 44

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.id ]
  • Bvar.list[*].id (correct answer)
  • C[ var.list[*].id ]
  • D{ for o in var.list : o => o.id }
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: var.list[*].id

Topic 1 Β· Question 45

Only the user that generated a plan may apply it.

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

The correct answer is B. Option B: False

Topic 1 Β· Question 46

Examine the following Terraform configuration, which uses the data source for an AWS AMI. What value should you enter for the ami argument in the AWS instance resource?

Exhibit 1 for question 46
  • Aaws_ami.ubuntu
  • Bdata.aws_ami.ubuntu
  • Cdata.aws_ami.ubuntu.id (correct answer)
  • Daws_ami.ubuntu.id
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: data.aws_ami.ubuntu.id

Topic 1 Β· Question 48

You have never used Terraform before and would like to test it out using a shared team account for a cloud provider. The shared team account already contains 15 virtual machines (VM). You develop a Terraform configuration containing one VM, perform terraform apply, and see that your VM was created successfully. What should you do to delete the newly-created VM with Terraform?

  • AThe Terraform state file contains all 16 VMs in the team account. Execute terraform destroy and select the newly-created VM.
  • BThe Terraform state file only contains the one new VM. Execute terraform destroy. (correct answer)
  • CDelete the Terraform state file and execute Terraform apply.
  • DDelete the VM using the cloud provider console and terraform apply to apply the changes to the Terraform state file.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: The Terraform state file only contains the one new VM. Execute terraform destroy.

Explanation

terraform destroy removes infrastructure managed by the current Terraform configuration and state. 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 49

It is ____________ to change the Terraform backend from the default β€œlocal” backend to a different one after performing your first terraform apply.

  • Aimpossible
  • Bdiscouraged
  • Coptional (correct answer)
  • Dmandatory
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: optional

Topic 1 Β· Question 50

Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into syslog.

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

The correct answer is B. Option B: False

Topic 1 Β· Question 51

Where in your Terraform configuration do you specify a state backend?

  • AThe terraform block (correct answer)
  • BThe resource block
  • CThe provider block
  • DThe datasource block
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: The terraform block

Topic 1 Β· Question 52

In Terraform 0.13 and above, outside of the required_providers block, Terraform configurations always refer to providers by their local names.

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

The correct answer is A. Option A: True

Topic 1 Β· Question 53

What command should you run to display all workspaces for the current configuration?

  • Aterraform workspace
  • Bterraform workspace show
  • Cterraform workspace list (correct answer)
  • Dterraform show workspace
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: terraform workspace list

Explanation

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

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

Which of the following is true about terraform apply? (Choose two.)

  • AYou cannot target specific resources for the operation.
  • BDepending on provider specification, Terraform may need to destroy and recreate your infrastructure resources. (correct answer)
  • CIt only operates on infrastructure defined in the current working directory or workspace. (correct answer)
  • DBy default, it does not refresh your state file to reflect the current infrastructure configuration.
  • EYou must pass the output of a terraform plan command to it.
Reveal answer & explanation
Correct answer: B, C

The correct answer is B, C. Option B: Depending on provider specification, Terraform may need to destroy and recreate your infrastructure resources. Option C: It only operates on infrastructure defined in the current working directory or workspace.

Explanation

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

Topic 1 Β· Question 55

Which of these is the best practice to protect sensitive values in state files?

  • ABlockchain
  • BSecure Sockets Layer (SSL)
  • CEnhanced remote backends (correct answer)
  • DSigned Terraform providers
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Enhanced remote backends

Explanation

A Terraform backend determines where state is stored and, for supported backends, how operations and locking are performed.

Topic 1 Β· Question 56

Which of the following is available only in HCP Terraform workspaces and not in Terraform CLI?

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

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

Topic 1 Β· Question 57

How would you reference the "name" value of the second instance of this fictitious resource?

Exhibit 1 for question 57
  • Aelement(aws_instance.web, 2)
  • Baws_instance.web[1].name (correct answer)
  • Caws_instance.web[1]
  • Daws_instance.web[2].name
  • Eaws_instance.web.*.name
Reveal answer & explanation
Correct answer: B

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

Topic 1 Β· Question 58

A Terraform provider is not responsible for:

  • AUnderstanding API interactions with some service
  • BProvisioning infrastructure in multiple clouds (correct answer)
  • CExposing resources and data sources based on an API
  • DManaging actions to take based on resource differences
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Provisioning infrastructure in multiple clouds

Topic 1 Β· Question 59

Terraform provisioners can be added to any resource block.

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

The correct answer is A. Option A: True

Topic 1 Β· Question 60

What is terraform refresh intended to detect?

  • ATerraform configuration code changes
  • BEmpty state files
  • CState file drift (correct answer)
  • DCorrupt state files
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: 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 62 Β· Select all that apply

Which parameters does terraform import require? (Choose two.)

  • AProvider
  • BPath
  • CResource ID (correct answer)
  • DResource address (correct answer)
Reveal answer & explanation
Correct answer: C, D

The correct answer is C, D. Option C: Resource ID Option D: Resource address

Showing questions 41–60 of 368 Β· Page 3 of 19