
Get TA-002-P Braindumps & TA-002-P Real Exam Questions
HashiCorp TA-002-P Actual Questions and Braindumps
HashiCorp TA-002-P Exam Syllabus Topics:
| Topic | Details |
|---|---|
| Topic 1 |
|
| Topic 2 |
|
| Topic 3 |
|
| Topic 4 |
|
| Topic 5 |
|
| Topic 6 |
|
| Topic 7 |
|
| Topic 8 |
|
| Topic 9 |
|
| Topic 10 |
|
| Topic 11 |
|
| Topic 12 |
|
| Topic 13 |
|
| Topic 14 |
|
| Topic 15 |
|
| Topic 16 |
|
NEW QUESTION 180
Which of the following type of variable allows multiple values of several distinct types to be grouped together as a single value?
- A. Object
- B. Map
- C. List
- D. Tuple
Answer: A,D
Explanation:
Structural type of variable allows multiple values of several distinct types to be grouped together as a single value. They require a schema as an argument, to specify which types are allowed for which elements.
https://www.terraform.io/docs/configuration/types.html
NEW QUESTION 181
Select all features which are exclusive to Terraform Enterprise. (Select Three)
- A. Clustering
- B. SAML/SSO
- C. Cost Estimation
- D. Sentinel
- E. Audit Logs
Answer: A,B,E
Explanation:
Explanation
Sentinel and Cost Estimation are also available in Terraform Cloud
https://www.hashicorp.com/products/terraform/pricing/
NEW QUESTION 182
Which statement describes a goal of infrastructure as code?
- A. A pipeline process to test and deliver software
- B. Write once, run anywhere
- C. An abstraction from vendor specific APIs
- D. The programmatic configuration of resources
Answer: D
NEW QUESTION 183
You have created a terraform script that uses a lot of new constructs that have been introduced in terraform v0.12. However, many developers who are cloning the script from your git repo, are using v0.11, and getting errors. What can be done from your end to solve this problem?
- A. Refactor the code to support both v0.11, and v0.12. It might be a difficult process, but there is no other way.
- B. Add a condition in front of each such specific construct, to check whether the running terraform version id v0.11 or v0.12, and ,work accordingly.
- C. Force developer to use v0.12 by using terraform setting 'required_version' and set it to >=0.12.
- D. Add comments in your code to tell developers to use v0.12 . If they use v0.11 , that should be their problem , which they need to figure out.
Answer: C
Explanation:
https://www.terraform.io/docs/configuration/terraform.html
NEW QUESTION 184
What does the default "local" Terraform backend store?
- A. Terraform binary
- B. tfplan files
- C. State file
- D. Provider plugins
Answer: C
Explanation:
The local backend stores state on the local filesystem, locks that state using system APIs, and performs operations locally.
NEW QUESTION 185
Jim has created several AWS resources from a single terraform configuration file. Someone from his team has manually modified one of the EC2 instance.
Now to discard the manual change, Jim wants to destroy and recreate the EC2 instance. What is the best way to do it?
- A. terraform refresh
- B. terraform taint
- C. terraform destroy
- D. terraform recreate
Answer: B
Explanation:
Explanation
The terraform taint command manually marks a Terraform-managed resource as tainted, forcing it to be destroyed and recreated on the next apply.
This command will not modify infrastructure, but does modify the state file in order to mark a resource as tainted. Once a resource is marked as tainted, the next plan will show that the resource will be destroyed and recreated and the next apply will implement this change.
Forcing the recreation of a resource is useful when you want a certain side effect of recreation that is not visible in the attributes of a resource. For example: re-running provisioners will cause the node to be different or rebooting the machine from a base image will cause new startup scripts to run.
Note that tainting a resource for recreation may affect resources that depend on the newly tainted resource. For example, a DNS resource that uses the IP address of a server may need to be modified to reflect the potentially new IP address of a tainted server. The plan command will show this if this is the case.
This example will taint a single resource:
$ terraform taint aws_security_group.allow_all
The resource aws_security_group.allow_all in the module root has been marked as tainted.
https://www.terraform.io/docs/commands/taint.html
NEW QUESTION 186
The terraform init command is always safe to run multiple times, to bring the working directory up to date with changes in the configuration. Though subsequent runs may give errors, this command will never delete your existing configuration or state.
- A. True
- B. False
Answer: A
Explanation:
https://www.terraform.io/docs/commands/init.html
NEW QUESTION 187
Which provisioner invokes a process on the resource created by Terraform?
- A. remote-exec
- B. local-exec
- C. null-exec
- D. file
Answer: A
Explanation:
Explanation
The remote-exec provisioner invokes a script on a remote resource after it is created. Reference:
https://www.terraform.io/docs/language/resources/provisioners/remote-exec.html
NEW QUESTION 188
Select the answer below that completes the following statement: Terraform Cloud can be managed from the CLI but requires __________?
- A. a username and password
- B. authentication using MFA
- C. an API token
- D. a TOTP token
Answer: C
Explanation:
API and CLI access are managed with API tokens, which can be generated in the Terraform Cloud UI. Each user can generate any number of personal API tokens, which allow access with their own identity and permissions. Organizations and teams can also generate tokens for automating tasks that aren't tied to an individual user.
NEW QUESTION 189
What is the result of the following terraform function call?
- A. False
Explanation
https://www.terraform.io/docs/configuration/functions/index.html - B. True
Answer: A
NEW QUESTION 190
does not require GO language to be installed as a prerequisite and it does not require a Windows Server as well.
- A. True
- B. False
Answer: B
NEW QUESTION 191
When using providers that require the retrieval of data, such as the HashiCorp Vault provider, in what phase does Terraform actually retrieve the data required?
- A. terraform plan
- B. terraform delete
- C. terraform init
- D. terraform apply
Answer: C
NEW QUESTION 192
Forcing the recreation of a resource is useful when you want a certain side effect of recreation that is not visible in the attributes of a resource. What command will do this?
- A. terraform graph
- B. terraform refresh
- C. terraform taint
- D. terraform apply
Answer: C
Explanation:
Explanation
The terraform taint command manually marks a Terraform-managed resource as tainted, forcing it to be destroyed and recreated on the next apply.
This command will not modify infrastructure, but does modify the state file in order to mark a resource as tainted. Once a resource is marked as tainted, the next plan will show that the resource will be destroyed and recreated and the next apply will implement this change.
Forcing the recreation of a resource is useful when you want a certain side effect of recreation that is not visible in the attributes of a resource. For example: re-running provisioners will cause the node to be different or rebooting the machine from a base image will cause new startup scripts to run.
Note that tainting a resource for recreation may affect resources that depend on the newly tainted resource. For example, a DNS resource that uses the IP address of a server may need to be modified to reflect the potentially new IP address of a tainted server. The plan command will show this if this is the case.
This example will taint a single resource:
$ terraform taint aws_security_group.allow_all
The resource aws_security_group.allow_all in the module root has been marked as tainted.
https://www.terraform.io/docs/commands/taint.html
NEW QUESTION 193
By default, provisioners that fail will also cause the Terraform apply itself to error. How can you change this default behavior within a provisioner?
- A. provisioner "local-exec" { on_failure = "continue" }
- B. provisioner "local-exec" { on_failure = continue }
- C. provisioner "local-exec" { on_failure = "next" }
- D. provisioner "local-exec" { when = "failure" terraform apply }
Answer: A
Explanation:
https://www.terraform.io/docs/provisioners/index.html
NEW QUESTION 194
Which of the following commands will launch the Interactive console for Terraform interpolations?
- A. terraform console
- B. terraform cmdline
- C. terraform
- D. terraform cli
Answer: D
Explanation:
Explanation
https://www.terraform.io/docs/commands/console.html
NEW QUESTION 195
Which of the below configuration file formats are supported by Terraform? (Select TWO)
- A. Node
- B. HCL
- C. YAML
- D. JSON
- E. Go
Answer: B,D
Explanation:
Explanation
Terraform supports both HashiCorp Configuration Language (HCL) and JSON formats for configurations.
https://www.terraform.io/docs/configuration/
NEW QUESTION 196
Which of the below command will upgrade the provider version to the latest acceptable one?
- A. terraform init -update
- B. terraform plan upgrade
- C. terraform init -upgrade
- D. terraform provider -upgrade
Answer: C
Explanation:
Explanation
To upgrade to the latest acceptable version of each provider, run terraform init -upgrade. This command also upgrades to the latest versions of all Terraform modules.
https://www.terraform.io/docs/configuration/providers.html
NEW QUESTION 197
What is the command you can use to set an environment variable named "var1"of type String?
- A. export TF_VAR_VAR1
- B. variable "var1" { type = "string"}
- C. export TF_VAR_var1
- D. set TF_VAR_var1
Answer: C
Explanation:
Explanation
The environment variable must be in the format TF_VAR_name, so for the quetion: TF_VAR_var1 is the correct choice.
https://www.terraform.io/docs/commands/environment-variables.html#tf_var_name
NEW QUESTION 198
Which of the following represents a feature of Terraform Cloud that is NOT free to customers?
- A. Private Module Registry
- B. VCS Integration
- 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 199
After running into issues with Terraform, you need to enable verbose logging to assist with troubleshooting the error. Which of the following values provides the MOST verbose logging?
- A. TRACE
- B. INFO
- C. ERROR
- D. WARN
- E. DEBUG
Answer: A
Explanation:
Explanation
Terraform has detailed logs that 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.
Examples:
export TF_LOG=DEBUG
export TF_LOG=TRACE
NEW QUESTION 200
When configuring a remote backend in Terraform, it might be a good idea to purposely omit some of the required arguments to ensure secrets and other important data aren't inadvertently shared with others. What are the ways the remaining configuration can be added to Terraform so it can initialize and communicate with the backend? (select three)
- A. use the -backend-config=PATH to specify a separate config file
- B. command-line key/value pairs
- C. directly querying HashiCorp Vault for the secrets
- D. interactively on the command line
Answer: A,B,D
Explanation:
Explanation
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: https://www.terraform.io/docs/backends/init.html#backend-initialization
NEW QUESTION 201
Which of these is the best practice to protect sensitive values in state files?
- A. Enhanced remote backends
- B. Secure Sockets Layer (SSL)
- C. Blockchain
- D. Signed Terraform providers
Answer: A
Explanation:
Explanation
Use of remote backends and especially the availability of Terraform Cloud, there are now a variety of backends that will encrypt state at rest and will not store the state in cleartext on machines running. Reference:
https://www.terraform.io/docs/extend/best-practices/sensitive-state.html
NEW QUESTION 202
......
TA-002-P Dumps To Pass HashiCorp Exam in 24 Hours - ValidBraindumps: https://www.validbraindumps.com/TA-002-P-exam-prep.html
Buy Latest TA-002-P Exam Q&A PDF - One Year Free Update: https://drive.google.com/open?id=1BnhhyISkRrPqFdd4gmKsSVCWST6K1xAA