[Dec 17, 2024] Latest HashiCorp Infrastructure Automation TA-002-P Actual Free Exam Questions [Q52-Q76] | TestBraindump

[Dec 17, 2024] Latest HashiCorp Infrastructure Automation TA-002-P Actual Free Exam Questions [Q52-Q76]

Share

[Dec 17, 2024] Latest HashiCorp Infrastructure Automation TA-002-P Actual Free Exam Questions

HashiCorp Infrastructure Automation TA-002-P Dumps Updated Practice Test and 94 unique questions

NEW QUESTION # 52
Which of the following represents a feature of Terraform Cloud that is NOT free to customers?

  • A. VCS Integration
  • B. Private Module Registry
  • C. WorkSpace Management
  • D. Roles and Team Management

Answer: D

Explanation:
Role Based Access Controls (RBAC) for controlling permissions for who has access to what configurations within an organization and it is not free to customers.
https://www.hashicorp.com/products/terraform/pricing/


NEW QUESTION # 53
What features stops multiple admins from changing the Terraform state at the same time?

  • A. Version control
  • B. Backend types
  • C. State locking
  • D. Provider constraints

Answer: C

Explanation:
Explanation
Somewhat ambiguous question however the key phrase is "feature". You need a remote backend first with a
State Locking feature available to avoid this scenario.
https://blog.gruntwork.io/how-to-manage-terraform-state-28f5697e68fa


NEW QUESTION # 54
You have provisioned some virtual machines (VMs) on Google Cloud Platform (GCP) using the gcloud command line tool. However, you are standardizing with Terraform and want to manage these VMs using Terraform instead.
What are the two things you must do to achieve this? (Choose two.)

  • A. Provision new VMs using Terraform with the same VM names
  • B. Run the terraform import-gcp command
  • C. Use the terraform import command for the existing VMs
  • D. Write Terraform configuration for the existing VMs

Answer: B,C

Explanation:
The terraform import command is used to import existing infrastructure.
Import existing Google Cloud resources into Terraform with Terraformer.
Reference: https://www.terraform.io/docs/cli/import/usage.html
https://cloud.google.com/docs/terraform


NEW QUESTION # 55
What command should you run to display all workspaces for the current configuration?

  • A. terraform show workspace
  • B. terraform workspace
  • C. terraform workspace show
  • D. terraform workspace list

Answer: D

Explanation:
terraform workspace list
The command will list all existing workspaces.


NEW QUESTION # 56
You are writing a child Terraform module which provisions an AWS instance. You want to make use of the IP
address returned in the root configuration. You name the instance resource "main".
Which of these is the correct way to define the output value using HCL2?

  • A. Option A
  • B. Option B

Answer: A


NEW QUESTION # 57
When using parent/child modules to deploy infrastructure, how would you export a value from one module to
import into another module.
For example, a module dynamically deploys an application instance or virtual machine, and you need the IP
address in another module to configure a related DNS record in order to reach the newly deployed application.

  • A. Export the value using terraform export and input the value using terraform input.
  • B. Preconfigure the IP address as a parameter in the DNS module.
  • C. Configure an output value in the application module in order to use that value for the DNS module.
  • D. Configure the pertinent provider's configuration with a list of possible IP addresses to use.

Answer: C

Explanation:
Explanation
Output values are like the return values of a Terraform module, and have several uses:
* A child module can use outputs to expose a subset of its resource attributes to a parent module.
* A root module can use outputs to print certain values in the CLI output after running terraform apply.
* When using remote state, root module outputs can be accessed by other configurations via a
terraform_remote_state data source.
https://www.terraform.io/docs/configuration/outputs.html


NEW QUESTION # 58
Which option can not be used to keep secrets out of Terraform configuration files?

  • A. A Terraform provider
  • B. Environment variables
  • C. secure string
  • D. A -var flag

Answer: A


NEW QUESTION # 59
You want to define a single input variable to capture configuration values for a server. The values must represent memory as a number, and the server name as a string.
Which variable type could you use for this input?

  • A. Map
  • B. Object
  • C. Terraform does not support complex input variables of different types
  • D. List

Answer: B

Explanation:
This is the variable type that you could use for this input, as it can store multiple attributes of different types within a single value. The other options are either invalid or incorrect for this use case.


NEW QUESTION # 60
How can you ensure that the engineering team who has access to git repo will not create any non-compliant resources that might lead to a security audit failure in future. your team is using Hashicorp Terraform Enterprise Edition.

  • A. 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.
  • B. Since your team is using Hashicorp Terraform Enterprise Edition , enable Sentinel , and write Policy-As-Code rules that will check for non-compliant resource provisioning , and prevent/report them.
  • C. Implement a review process where every code will be reviewed before merging to the master branch.
  • D. 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.

Answer: B

Explanation:
Explanation
https://www.terraform.io/docs/cloud/sentinel/index.html


NEW QUESTION # 61
Terraform can run on Windows or Linux, but it requires a Server version of the Windows operating system.

  • A. False
  • B. True

Answer: B


NEW QUESTION # 62
Terraform Enterprise (also referred to as pTFE) requires what type of backend database for a clustered deployment?

  • A. MSSQL
  • B. MySQL
  • C. PostgreSQL
  • D. Cassandra

Answer: C

Explanation:
Explanation
External Services mode stores the majority of the stateful data used by the instance in an external PostgreSQL database and an external S3-compatible endpoint or Azure blob storage. There is still critical data stored on the instance that must be managed with snapshots. Be sure to check the PostgreSQL Requirements for information that needs to be present for Terraform Enterprise to work. This option is best for users with expertise managing PostgreSQL or users that have access to managed PostgreSQL offerings like AWS RDS.


NEW QUESTION # 63
While attempting to deploy resources into your cloud provider using Terraform. you begin to see some odd behavior and experience sluggish responses. In order to troubleshoot you decide to turn on Terraform debugging. Which environment variables must be configured to make Terraform's logging more verbose?

  • A. TF_10G_PATM
  • B. TF_LOG
  • C. TF_10G_LEVEL
  • D. TF.LOG.FUE

Answer: B


NEW QUESTION # 64
You have a Terraform configuration file where a variable itemNum is defined as follows:
variable "itemNum" { default = 3}
You also have a defined the following environment variables in your shell: TF_itemNum =6, TF_VAR_itemNum =9. You also have a terraform.tfvars file with the following contents itemNum = 7 When you run the following apply command, what is the value assigned to the itemNum variable?
terraform apply -var itemNum =4

  • A. 0
  • B. 1
  • C. 2
  • D. 3
  • E. 4

Answer: E

Explanation:
Explanation
The -var and -var-file methods of assigning variables have the highest precedence.
https://www.terraform.io/docs/configuration/variables.html


NEW QUESTION # 65
During a terraform apply, a resource is successfully created but eventually fails during provisioning. What
happens to the resource?

  • A. The resource will be planned for destruction and recreation upon the next terraform apply
  • B. The failure of provisioner will be ignored and it will not cause a failure to terraform apply
  • C. Terraform will retry to provision again.
  • D. The resource will be automatically destroyed.

Answer: A

Explanation:
Explanation
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. Terraform does this because a failed provisioner can
leave a resource in a semi-configured state. Because Terraform cannot reason about what the provisioner does,
the only way to ensure proper creation of a resource is to recreate it. This is tainting.
You can change this behavior by setting the on_failure attribute, which is covered in detail below.
https://www.terraform.io/docs/provisioners/index.html#creation-time-provisioners
https://www.terraform.io/docs/provisioners/index.html#destroy-time-provisioners
https://www.terraform.io/docs/provisioners/index.html#failure-behavior


NEW QUESTION # 66
Choose the answer that correctly completes the sentence: _______backends support state locking.

  • A. Some
  • B. No
  • C. All
  • D. Only local

Answer: A


NEW QUESTION # 67
Given the Terraform configuration below, in which order will the resources be created?

  • A. resources will be created simultaneously
  • B. aws_eip will be created first aws_instance will be created second
  • C. aws_instance will be created first aws_eip will be created second
  • D. Larger image

Answer: C

Explanation:
Explanation
The aws_instance will be created first, and then aws_eip will be created second due to the aws_eip's resource
dependency of the aws_instance id


NEW QUESTION # 68
How would you reference the "name" value of the second instance of this fictitious resource?

  • A. aws_instance.web[1].name
  • B. aws_instance.web[2].name
  • C. aws_instance.web.*.name
  • D. element(aws_instance.web, 2)
  • E. aws_instance.web[1]

Answer: D

Explanation:
Reference: https://www.terraform.io/docs/configuration-0-11/interpolation.html


NEW QUESTION # 69
Terraform providers are always installed from the Internet.

  • A. False
  • B. True

Answer: A

Explanation:
Terraform providers are not always installed from the Internet. There are other ways to install provider plugins, such as from a local mirror or cache, from a local filesystem directory, or from a network filesystem. These methods can be useful for offline or air-gapped environments, or for customizing the installation process. You can configure the provider installation methods using the provider_installation block in the CLI configuration file.


NEW QUESTION # 70
What information does the public Terraform Module Registry automatically expose about published modules?

  • A. Required input variables
  • B. Outputs
  • C. Optional inputs variables and default values
  • D. None of the above
  • E. All of the above

Answer: E

Explanation:
The public Terraform Module Registry automatically exposes all the information about published modules, including required input variables, optional input variables and default values, and outputs. This helps users to understand how to use and configure the modules.


NEW QUESTION # 71
You can reference a resource created with for_each using a Splat ( *) expression.

  • A. False
  • B. True

Answer: A

Explanation:
You cannot reference a resource created with for_each using a splat (*) expression, as it will not work with resources that have non-numeric keys. You need to use a for expression instead to iterate over the resource instances.


NEW QUESTION # 72
True or False? terraform init cannot automatically download Community providers.

  • A. False
  • B. True

Answer: B


NEW QUESTION # 73
Once a resource is marked as tainted, the next plan will show that the resource will be _________ and ___________ and the next apply will implement this change.

  • A. destroyed and recreated
  • B. tainted and not destroyed
  • C. destroyed and not recreated
  • D. recreated and tainted

Answer: A


NEW QUESTION # 74
The current implementation of Terraform import can only import resources into the state. It does not generate
configuration.

  • A. False
  • B. True

Answer: B

Explanation:
Explanation
The current implementation of Terraform import can only import resources into the state. It does not generate
configuration. A future version of Terraform will also generate configuration.
Because of this, prior to running terraform import it is necessary to write manually a resource configuration
block for the resource, to which the imported object will be mapped.
While this may seem tedious, it still gives Terraform users an avenue for importing existing resources.
https://www.terraform.io/docs/import/index.html#currently-state-only


NEW QUESTION # 75
What does state locking accomplish?

  • A. Encrypts any credentials stored within the state file
  • B. Copies the state file from memory to disk
  • C. Blocks Terraform commands from modifying the state file
  • D. Prevents accidental deletion of the state file

Answer: C

Explanation:
Explanation
If supported by your backend, Terraform will lock your state for all operations that could write state. This
prevents others from acquiring the lock and potentially corrupting your state. Source:
https://www.terraform.io/language/state/locking


NEW QUESTION # 76
......

Verified TA-002-P dumps Q&As - 100% Pass from TestBraindump: https://actualtests.testbraindump.com/TA-002-P-exam-prep.html