[Sep-2021] Verified HashiCorp Exam Dumps with TA-002-P Exam Study Guide [Q65-Q84]

Share

[Sep-2021] Verified HashiCorp Exam Dumps with TA-002-P Exam Study Guide

Best Quality HashiCorp TA-002-P Exam Questions DumpsReview Realistic Practice Exams [2021]

NEW QUESTION 65
Your manager has instructed you to start using terraform for your day-to-day operations, but your security team is concerned about the terraform state files. They have heard it contains confidential information, and are worried that it will not be securely protected. What should be your response to the security team in this regard?

  • A. Ensure that the state is managed in a remote backend , preferably an enterprise grade state management system like Terraform Cloud.
  • B. Inform the security team that using terraform state is optional . There are ways to avoid it , and you will do the same.
  • C. Mask the confidential entries in the terraform state file , using Vault Enterprise, another Hashicorp product , while keeping it locally.
  • D. Keep the state file locally on each developer machine , and ensure that there is a local protection software like KeyPass protecting it.

Answer: A

Explanation:
Explanation
https://www.terraform.io/docs/state/index.html
State is very important topic for exam. Please read all of the below subtopics Purpose Import Existing Resources Locking Workspaces Remote State Sensitive Data

 

NEW QUESTION 66
What value does the Terraform Cloud/Terraform Enterprise private module registry provide over the public Terraform Module Registry?

  • A. The ability to restrict modules to members of Terraform Cloud or Enterprise organizations
  • B. The ability to share modules with public Terraform users and members of Terraform Enterprise Organizations
  • C. The ability to tag modules by version or release
  • D. The ability to share modules publicly with any user of Terraform

Answer: D

Explanation:
Terraform Registry is an index of modules shared publicly using this protocol. This public registry is the easiest way to get started with Terraform and find modules created by others in the community.

 

NEW QUESTION 67
Which of the following state management command allow you to retrieve a list of resources that are part of the state file?

  • A. terraform list
  • B. terraform view
  • C. terraform state list
  • D. terraform state view

Answer: C

Explanation:
Explanation
The terraform state list command is used to list resources within a Terraform state.
Usage: terraform state list [options] [address...]
The command will list all resources in the state file matching the given addresses (if any). If no addresses are given, all resources are listed.
https://www.terraform.io/docs/commands/state/list.html

 

NEW QUESTION 68
Examine the following Terraform configuration, which uses the data source for an AWS AMI.
What value should you enter for the ami argument in the AWS instance resource?

  • A. data.aws_ami.ubuntu
  • B. aws_ami.ubuntu
  • C. aws_ami.ubuntu.id
  • D. data.aws_ami.ubuntu.id

Answer: D

Explanation:
resource "aws_instance" "web" {
ami = data.aws_ami.ubuntu.id

 

NEW QUESTION 69
Which of the following is allowed as a Terraform variable name?

  • A. source
  • B. name
  • C. version
  • D. count

Answer: B

 

NEW QUESTION 70
Which of the below options is a valid interpolation syntax for retrieving a data source?

  • A. ${data.google_dns_keys.foo_dns_keys.key_signing_keys[0].ds_record}
  • B. ${google_storage_bucket.backend}
  • C. ${aws_instance.web.id.data}
  • D. ${azurerm_resource_group.test.data}

Answer: A

Explanation:
Data source attributes are interpolated with the general syntax data.TYPE.NAME.ATTRIBUTE. The interpolation for a resource is the same but without the data. prefix (TYPE.NAME.ATTRIBUTE).
https://www.terraform.io/docs/configuration-0-11/interpolation.html#attributes-of-a-data-source

 

NEW QUESTION 71
You have created a custom variable definition file my_vars.tfvars. How will you use it for provisioning infrastructure?

  • A. terraform apply var-file="my_vars.tfvars"
  • B. terraform apply -var-file="my_vars.tfvars"
  • C. terraform apply -var-state-file ="my_vars.tfvars"
  • D. terraform plan -var-file="my_vars.tfvar"

Answer: B

Explanation:
To set lots of variables, it is more convenient to specify their values in a variable definitions file (with a filename ending in either .tfvars or .tfvars.json) and then specify that file on the command line with -var-file:
terraform apply -var-file="my_vars.tfvars"
https://www.terraform.io/docs/configuration/variables.html#variable-definitions-tfvars-files

 

NEW QUESTION 72
How is the Terraform remote backend different than other state backends such as S3, Consul, etc.?

  • A. It is only available to paying customers
  • B. All of the above
  • C. It can execute Terraform runs on dedicated infrastructure on premises or in Terraform Cloud
  • D. It doesn't show the output of a terraform apply locally

Answer: C

Explanation:
Explanation
If you and your team are using Terraform to manage meaningful infrastructure, we recommend using the remote backend with Terraform Cloud or Terraform Enterprise.
Reference: https://www.terraform.io/docs/language/settings/backends/index.html

 

NEW QUESTION 73
What is the provider for this fictitious resource?

  • A. main
  • B. test
  • C. vpc
  • D. aws

Answer: D

 

NEW QUESTION 74
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. Implement a review process where every code will be reviewed before merging to the master branch.
  • B. 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.
  • 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.
  • D. 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.

Answer: D

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

 

NEW QUESTION 75
Your company has been using Terraform Cloud for a some time now . But every team is creating their own modules , and there is no standardization of the modules , with each team creating the resources in their own unique way . You want to enforce a standardization of the modules across the enterprise . What should be your approach.

  • A. Upload the modules in the terraform public module registry , and ask teams to reference them
  • B. Upgrade to Terraform enterprise , since this is not possible in terraform cloud.
  • C. Implement a Private module registry in Terraform cloud , and ask teams to reference them.
  • D. Create individual workspaces for each team , and ask them to share modules across workspaces.

Answer: C

Explanation:
Explanation
Terraform Cloud's private module registry helps you share Terraform modules across your organization. It includes support for module versioning, a searchable and filterable list of available modules, and a configuration designer to help you build new workspaces faster.
By design, the private module registry works much like the public Terraform Registry. If you're already used the public registry, Terraform Cloud's registry will feel familiar.
Understand the different offerings in Terraform OS, Terraform Cloud and Terraform Enterprise. Terraform Cloud's private module registry helps you share Terraform modules across your organization.
https://www.terraform.io/docs/cloud/registry/index.html
https://www.terraform.io/docs/cloud/registry/publish.html

 

NEW QUESTION 76
You have been given requirements to create a security group for a new application. Since your organization standardizes on Terraform, you want to add this new security group with the fewest number of lines of code. What feature could you use to iterate over a list of required tcp ports to add to the new security group?

  • A. dynamic backend
  • B. terraform import
  • C. dynamic block
  • D. splat expression

Answer: C

Explanation:
A dynamic block acts much like a for expression, but produces nested blocks instead of a complex typed value. It iterates over a given complex value and generates a nested block for each element of that complex value.
https://www.terraform.io/docs/configuration/expressions.html#dynamic-blocks

 

NEW QUESTION 77
Terraform requires the Go runtime as a prerequisite for installation.

  • A. False
  • B. True

Answer: A

 

NEW QUESTION 78
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. 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.
  • B. Force developer to use v0.12 by using terraform setting 'required_version' and set it to >=0.12.
  • C. Refactor the code to support both v0.11, and v0.12. It might be a difficult process, but there is no other way.
  • D. 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.

Answer: B

Explanation:
https://www.terraform.io/docs/configuration/terraform.html

 

NEW QUESTION 79
Which of the following are string functions? Select three

  • A. join
  • B. format
  • C. tostring
  • D. tonumber
  • E. Chomp

Answer: A,B,E

Explanation:
tonumber and tostring are Type Conversion function
https://www.terraform.io/docs/configuration/functions.html

 

NEW QUESTION 80
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.

  • A. 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.
  • B. Detailed logs are not available in terraform OSS, except the crash message. You need to upgrade to terraform enterprise for this point.
  • C. Terraform OSS can push all its logs to a syslog endpoint. 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.
  • D. Enable the TF_LOG_PATH to the log sink file location, and logging output will automatically be stored there.

Answer: A

Explanation:
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.

 

NEW QUESTION 81
In regards to deploying resources in multi-cloud environments, what are some of the benefits of using Terraform rather than a provider's native tooling? (select three)

  • A. Terraform can help businesses deploy applications on multiple clouds and on-premises infrastructure.
  • B. Terraform can manage cross-cloud dependencies.
  • C. Terraform simplifies management and orchestration, helping operators build large-scale, multi-cloud infrastructure.
  • D. Terraform is not cloud-agnostic and can be used to deploy resources across a single public cloud.

Answer: A,B,C

Explanation:
Explanation
Terraform is cloud-agnostic and allows a single configuration to be used to manage multiple providers, and to even handle cross-cloud dependencies. This simplifies management and orchestration, helping operators build large-scale multi-cloud infrastructures.
https://www.terraform.io/intro/use-cases.html

 

NEW QUESTION 82
Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into syslog.

  • A. True
  • B. False

Answer: A

Explanation:
Reference: https://www.terraform.io/docs/internals/debugging.html

 

NEW QUESTION 83
Which of the following is considered a Terraform plugin?

  • A. Terraform language
  • B. Terraform provider
  • C. Terraform logic
  • D. Terraform tooling

Answer: B

Explanation:
Explanation
Terraform is built on a plugin-based architecture. All providers and provisioners that are used in Terraform configurations are plugins, even the core types such as AWS and Heroku. Users of Terraform are able to write new plugins in order to support new functionality in Terraform.
https://www.terraform.io/docs/plugins/basics.html

 

NEW QUESTION 84
......

Authentic Best resources for TA-002-P: https://www.dumpsreview.com/TA-002-P-exam-dumps-review.html

TA-002-P Test Engine Practice Exam: https://drive.google.com/open?id=1Z8kuQQof46IrEcYaICy-PfU-kU9AnomU