Free TA-002-P Exam Braindumps

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

Page 21 of 19
QUESTION 96

- (Exam Topic 4)
Which of the following is an invalid variable name?

  1. A. count
  2. B. web
  3. C. var1
  4. D. instance_name

Correct Answer: A
https://www.terraform.io/intro/examples/count.html

QUESTION 97

- (Exam Topic 4)
If a Terraform creation-time provisioner fails, what will occur by default?

  1. A. The resource will not be affected, but the provisioner will need to be applied again
  2. B. The resource will be destroyed
  3. C. The resource will be marked as "tainted"
  4. D. Nothing, provisioners will not show errors in the command line

Correct Answer: C
If a creation-time provisioner fails, the resource is marked as tainted. A tainted resource will be planned for destruction and recreation upon the next terraform apply .

QUESTION 98

- (Exam Topic 4)
Your team lead does not trust the junior terraform engineers who now have access to the git repo . So , he wants you to have some sort of a checking layer , whereby , you can ensure that the juniors will not create any non-compliant resources that might lead to a security audit failure in future. What can you do to efficiently enforce this?

  1. A. Create a design /security document (in PDF) and share to the team , and ask them to always follow that document , and never deviate from it.
  2. B. Since your team is using Hashicorp Terraform Enterprise Edition , enable Sentinel , and writePolicy-As-Code rules that will check for non-compliant resource provisioning , and prevent/report them.
  3. C. Use Terraform OSS Sentinel Lite version , which will save cost , since there is no charge for OSS , but it can still check for most non-compliant rules using Policy-As-Code.
  4. D. Create a git master branch , and implement PR . Every change needs to be reviewed by you , before being merged to the master branch.

Correct Answer: B
Sentinel is an embedded policy-as-code framework integrated with the HashiCorp Enterprise products. It enables fine-grained, logic-based policy decisions, and can be extended to use information from external sources.
https://www.terraform.io/docs/cloud/sentinel/index.html

QUESTION 99

- (Exam Topic 2)
You do not need to specify every required argument in the backend configuration. Omitting certain arguments may be desirable to avoid storing secrets, such as access keys, within the main configuration. When some or all of the arguments are omitted, we call this a ______.

  1. A. First Time Configuration
  2. B. Default Configuration
  3. C. Changing Configuration
  4. D. Partial Configuration
  5. E. Incomplete Configuration

Correct Answer: D
You do not need to specify every required argument in the backend configuration. Omitting certain arguments may be desirable to avoid storing secrets, such as access keys, within the main configuration. When some or all of the arguments are omitted, we call this a partial configuration.
With a partial configuration, the remaining configuration arguments must be provided as part of the initialization process. There are several ways to supply the remaining arguments:
* Interactively: Terraform will interactively ask you for the required values, unless interactive input is disabled. Terraform will not prompt for optional values.
* File: A configuration file may be specified via the init command line. To specify a file, use the
-backend-config=PATH option when running terraform init. If the file contains secrets it may be kept in a secure data store, such as Vault, in which case it must be downloaded to the local disk before running Terraform.
* Command-line key/value pairs: Key/value pairs can be specified via the init command line. Note that many shells retain command-line flags in a history file, so this isn't recommended for secrets. To specify a single key/value pair, use the -backend-config="KEY=VALUE" option when running terraform init.
https://www.terraform.io/docs/backends/config.html#partial-configuration

QUESTION 100

- (Exam Topic 4)
Select all Operating Systems that Terraform is available for. (select five)

  1. A. Linux
  2. B. macOS
  3. C. Unix
  4. D. Solaris
  5. E. Windows
  6. F. FreeBSD

Correct Answer: ABDEF

Terraform is available for macOS, FreeBSD, OpenBSD, Linux, Solaris, Windows https://www.terraform.io/downloads.html

Page 21 of 19

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