Free Terraform Associate Exam Braindumps (page: 21)

Page 20 of 113

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?

  1. Amazon S3
  2. Artifactory
  3. Git
  4. Terraform Cloud

Answer(s): C


Reference:

https://www.terraform.io/cdktf/concepts/remote-backends
https://docs.gitlab.com/ee/user/infrastructure/iac/terraform_state.html



Which backend does the Terraform CLI use by default?

  1. Terraform Cloud
  2. Consul
  3. Remote
  4. Local

Answer(s): D

Explanation:

"By default, Terraform implicitly uses a backend called local to store state as a local file on disk. Every other backend stores state in a remote service of some kind, which allows multiple people to access it. Accessing state in a remote service generally requires some kind of access credentials, since state data contains extremely sensitive information." https://www.terraform.io/language/settings/backends



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

  1. On disk in the /tmp directory
  2. In memory
  3. On disk in the .terraform sub-directory
  4. They are not cached

Answer(s): C

Explanation:

"A hidden .terraform directory, which Terraform uses to manage cached provider plugins and modules, record which workspace is currently active, and record the last known backend configuration in case it needs to migrate state on the next run. This directory is automatically managed by Terraform, and is created during initialization." https://www.terraform.io/cli/init



You write a new Terraform configuration and immediately run terraform apply in the CLI using the local backend.
Why will the apply fail?

  1. Terraform needs you to format your code according to best practices first
  2. Terraform needs to install the necessary plugins first
  3. The Terraform CLI needs you to log into Terraform cloud first
  4. Terraform requires you to manually run terraform plan first

Answer(s): B






Post your Comments and Discuss HashiCorp Terraform Associate exam with other Community members:

Terraform Associate Discussions & Posts