Free Terraform Associate Exam Braindumps (page: 38)

Page 37 of 113

What is the default backend for Terraform?

  1. consul
  2. gcs
  3. local
  4. etcd

Answer(s): C

Explanation:

By default, Terraform uses the "local" backend, which is the normal behavior of Terraform you're used to.


Reference:

https://www.terraform.io/docs/backends/index.html



You want terraform plan and apply to be executed in Terraform Cloud's run environment but the output is to be streamed locally. Which one of the below you will choose?

  1. Local Backends
  2. This can be done using any of the local or remote backends
  3. Remote Backends
  4. Terraform Backends

Answer(s): C

Explanation:

The remote backend stores Terraform state and may be used to run operations in Terraform Cloud. When using full remote operations, operations like terraform plan or terraform apply can be executed in Terraform Cloud's run environment, with log output streaming to the local terminal.
Remote plans and applies use variable values from the associated Terraform Cloud workspace. https://www.terraform.io/docs/backends/types/remote.html



Which of the following Terraform files should be ignored by Git when committing code to a repo? (select Three)

  1. Files named exactly terraform.tfvars or terraform.tfvars.json.
  2. Any files with names ending in .auto.tfvars or .auto.tfvars.json.
  3. input.tf
  4. terraform.tfstate
  5. output.tf

Answer(s): A,B,D

Explanation:

The .gitignore file should be configured to ignore Terraform files that either contain sensitive data or are not required to save.
Terraform state (terraform.tfstate) can contain sensitive data, depending on the resources in use and your definition of "sensitive." The state contains resource IDs and all resource attributes. For resources such as databases, this may contain initial passwords.
When using local state, state is stored in plain-text JSON files.
The terraform.tfvars file may contain sensitive data, such as passwords or IP addresses of an environment that you may not want to share with others.



What is the command you can use to set an environment variable named "var1"of type String?

  1. export TF_VAR_VAR1
  2. set TF_VAR_var1
  3. variable "var1" { type = "string"}
  4. export TF_VAR_var1

Answer(s): D

Explanation:

The environment variable must be in the format TF_VAR_name, so for the https://www.terraform.io/docs/commands/environment-variables.html#tf_var_name






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

Terraform Associate Discussions & Posts