Free TA-002-P Exam Braindumps

Pass your HashiCorp Certified: Terraform Associate exam with these free Questions and Answers

Page 19 of 19
QUESTION 86

- (Exam Topic 2)
terraform state subcommands such as list are read-only commands, do read-only commands create state backup files?

  1. A. Yes
  2. B. No

Correct Answer: B
Subcommands that are read-only (such as list) do not write any backup files since they aren't modifying the state.
All terraform state subcommands that modify the state write backup files. The path of these backup file can be controlled with -backup.
https://www.terraform.io/docs/commands/state/index.html#backups

QUESTION 87

- (Exam Topic 4)
Terra form installs its providers during which phase?

  1. A. Man
  2. B. Init
  3. C. Refresh
  4. D. All of the above

Correct Answer: B
Providers are installed in the init phase

QUESTION 88

- (Exam Topic 4)
You have written a terraform IaC script which was working till yesterday , but is giving some vague error from today , which you are unable to understand . You want more detailed logs that could potentially help you troubleshoot the issue , and understand the root cause. What can you do to enable this setting? Please note , you are using terraform OSS.

  1. A. Terraform OSS can push all its logs to a syslog endpoin
  2. B. As such, you have to set up the syslog sink, and enable TF_LOG_PATH env variable to the syslog endpoint and all logs will automatically start streaming.
  3. C. Detailed logs are not available in terraform OSS, except the crash messag
  4. D. You need to upgrade to terraform enterprise for this point.
  5. E. Enable the TF_LOG_PATH to the log sink file location, and logging output will automatically be stored there.
  6. F. Enable TF_LOG to the log level DEBUG, and then set TF_LOG_PATH to the log sink file location.Terraform debug logs will be dumped to the sink path, even in terraform OSS.

Correct Answer: D
Terraform has detailed logs which can be enabled by setting the TF_LOG environment variable to any value. This will cause detailed logs to appear on stderr.
You can set TF_LOG to one of the log levels TRACE, DEBUG, INFO, WARN or ERROR to change the verbosity of the logs. TRACE is the most verbose and it is the default if TF_LOG is set to something other than a log level name.
To persist logged output you can set TF_LOG_PATH in order to force the log to always be appended to a specific file when logging is enabled. Note that even when TF_LOG_PATH is set, TF_LOG must be set in order for any logging to be enabled.

QUESTION 89

- (Exam Topic 4)
John is writing a module and within the module, there are multiple places where he has to use the same
conditional expression but he wants to avoid repeating the same values or expressions multiple times in a configuration,. What is a better approach to dealing with this?

  1. A. Local Values
  2. B. Expressions
  3. C. Functions
  4. D. Variables

Correct Answer: A
A local value assigns a name to an expression, allowing it to be used multiple times within a module without repeating it.
https://www.terraform.io/docs/configuration/locals.html

QUESTION 90

- (Exam Topic 4)
From the code below, identify the implicit dependency:

  1. A. The EIP with an id of ami-2757f631
  2. B. The AMI used for the EC2 instance
  3. C. The EC2 instance labeled web_server
  4. D. The S3 bucket labeled company_data

Correct Answer: C

Page 19 of 19

Post your Comments and Discuss HashiCorp TA-002-P exam with other Community members: