πŸ”

TA-003 β€” questions

Page 4 of 19 Β· 368 total questions.

Topic 1 Β· Question 63

A Terraform local value can reference other Terraform local values.

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

The correct answer is A. Option A: True

Topic 1 Β· Question 64

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

  • Alist
  • Bmap
  • Ctree (correct answer)
  • Dset
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: tree

Topic 1 Β· Question 65

When running the command terraform taint against a managed resource you want to force recreation upon, Terraform will immediately destroy and recreate the resource.

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

The correct answer is B. Option B: False

Topic 1 Β· Question 66

All standard backend types support state storage, locking, and remote operations like plan, apply and destroy.

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

The correct answer is B. Option B: False

Topic 1 Β· Question 67

How can terraform plan aid in the development process?

  • AValidates your expectations against the execution plan without permanently modifying state (correct answer)
  • BInitializes your working directory containing your Terraform configuration files
  • CFormats your Terraform configuration files
  • DReconciles Terraform's state against deployed resources and permanently modifies state using the current status of deployed resources
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Validates your expectations against the execution plan without permanently modifying state

Topic 1 Β· Question 68

You would like to reuse the same Terraform configuration for your development and production environments with a different state file for each. Which command would you use?

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

The correct answer is B. Option B: terraform workspace

Explanation

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

Topic 1 Β· Question 69

What is the name assigned by Terraform to reference this resource?

Exhibit 1 for question 69
  • Acompute_instance
  • Bmain (correct answer)
  • Cgoogle
  • Dteat
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: main

Topic 1 Β· Question 70

You're building a CI/CD (continuous integration/ continuous delivery) pipeline and need to inject sensitive variables into your Terraform run. How can you do this safely?

  • APass variables to Terraform with a ""var flag (correct answer)
  • BCopy the sensitive variables into your Terraform code
  • CStore the sensitive variables in a secure_vars.tf file
  • DStore the sensitive variables as plain text in a source code repository
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Pass variables to Terraform with a ""var flag

Topic 1 Β· Question 71

Your security team scanned some Terraform workspaces and found secrets stored in a plaintext in state files. How can you protect sensitive data stored in Terraform state files?

  • ADelete the state file every time you run Terraform
  • BStore the state in an encrypted backend (correct answer)
  • CEdit your state file to scrub out the sensitive data
  • DAlways store your secrets in a secrets.tfvars file.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Store the state in an encrypted backend

Explanation

A Terraform backend determines where state is stored and, for supported backends, how operations and locking are performed. This option keeps traffic private / properly secured as required.

Topic 1 Β· Question 72

In contrast to Terraform Open Source, when working with Terraform Enterprise and Cloud Workspaces, conceptually you could think about them as completely separate working directories.

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

The correct answer is A. Option A: True

Topic 1 Β· Question 73

You want to know from which paths Terraform is loading providers referenced in your Terraform configuration (*.tf files). You need to enable debug messages to find this out. Which of the following would achieve this?

  • ASet the environment variable TF_LOG=TRACE (correct answer)
  • BSet verbose logging for each provider in your Terraform configuration
  • CSet the environment variable TF_VAR_log=TRACE
  • DSet the environment variable TF_LOG_PATH
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Set the environment variable TF_LOG=TRACE

Topic 1 Β· Question 74

How is terraform import run?

  • AAs a part of terraform init
  • BAs a part of terraform plan
  • CAs a part of terraform refresh
  • DBy an explicit call (correct answer)
  • EAll of the above
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: By an explicit call

Topic 1 Β· Question 75

You have a simple Terraform configuration containing one virtual machine (VM) in a cloud provider. You run terraform apply and the VM is created successfully. What will happen if you delete the VM using the cloud provider console, and run terraform apply again without changing any Terraform code?

  • ATerraform will remove the VM from state file
  • BTerraform will report an error
  • CTerraform will not make any changes
  • DTerraform will recreate the VM (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Terraform will recreate the VM This option needs the least custom development effort.

Topic 1 Β· Question 76

Which of these options is the most secure place to store secrets foe connecting to a Terraform remote backend?

  • ADefined in Environment variables (correct answer)
  • BInside the backend block within the Terraform configuration
  • CDefined in a connection configuration outside of Terraform
  • DNone of above
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Defined in Environment variables This option keeps traffic private / properly secured as required.

Topic 1 Β· Question 77

Your DevOps team is currently using the local backend for your Terraform configuration. You would like to move to a remote backend to begin storing the state file in a central location. Which of the following backends would not work?

  • AAmazon S3
  • BArtifactory
  • CGit (correct answer)
  • DTerraform Cloud
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Git

Topic 1 Β· Question 78

Which backend does the Terraform CLI use by default?

  • ATerraform Cloud
  • BConsul
  • CRemote
  • DLocal (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Local

Topic 1 Β· Question 79

When you initialize Terraform, where does it cache modules from the public Terraform Module Registry?

  • AOn disk in the /tmp directory
  • BIn memory
  • COn disk in the .terraform sub-directory (correct answer)
  • DThey are not cached
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: On disk in the .terraform sub-directory

Topic 1 Β· Question 80

You have a Terraform configuration that defines a single virtual machine with no references to it. You have run terraform apply to create the resource, then removed the resource definition from your Terraform configuration file. What will happen when you run terraform apply in the working directory again?

  • ATerraform will destroy the virtual machine. (correct answer)
  • BTerraform will remove the virtual machine from the state file, but the resource will still exist.
  • CTerraform will error.
  • DNothing.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Terraform will destroy the virtual machine.

Topic 1 Β· Question 81

What features stops multiple admins from changing the Terraform state at the same time?

  • AVersion control
  • BBackend types
  • CProvider constraints
  • DState locking (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: State locking

Explanation

State locking prevents concurrent operations from writing conflicting state changes.

Topic 1 Β· Question 82

A fellow developer on your team is asking for some help in refactoring their Terraform code. As part of their application's architecture, they are going to tear down an existing deployment managed by Terraform and deploy new. However, there is a server resource named aws_instance.ubuntu[1] they would like to keep to perform some additional analysis. What command should be used to tell Terraform to no longer manage the resource?

  • Aterraform apply rm aws_instance.ubuntu[1]
  • Bterraform state rm aws_instance.ubuntu[1] (correct answer)
  • Cterraform plan rm aws_instance.ubuntu[1]
  • Dterraform delete aws_instance.ubuntu[1]
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: terraform state rm aws_instance.ubuntu[1]

Explanation

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

Showing questions 61–80 of 368 Β· Page 4 of 19