HashiCorp TA-002-P Practice Test Pdf Exam Material
TA-002-P Answers TA-002-P Free Demo Are Based On The Real Exam
The benefit in Obtaining the HashiCorp Certified: Terraform Associate TA-002-P Professional Exam
This certification is an industry-recognized credential from HashiCorp that assesses the applicant’s understanding of fundamental concepts and skills on Terraform OSS and the characteristics that exist on Terraform Cloud & Terraform Enterprise packages. When it comes to employment, this certification is a career game-changer that will advance you closer to achieving your dream profession.
Some more benefits are:
- Demonstrate your involvement levels
- Better avenues for improving professional expertise
- Planning for a better future
- Generate new leads and gain new projects
- Better Salary
- Achieve recognition for your hard work
- Opportunities to grow your professional network
NEW QUESTION 110
Where does the Terraform local backend store its state?
- A. In the /tmp directory
- B. In the user's .terraformrc file
- C. In the terraform.tfstate file
- D. In the terraform.tfvars file
Answer: C
Explanation:
Explanation
The local backend stores state on the local filesystem, locks that state using system APIs, and performs operations locally.
Reference: https://www.terraform.io/docs/language/settings/backends/local.html
NEW QUESTION 111
If you enable TF_LOG = DEBUG, the log will be stored in syslog.log file in the currect directory.
- A. False
- B. True
Answer: A
Explanation:
https://www.terraform.io/docs/internals/debugging.html
NEW QUESTION 112
When should you use the force-unlock command?
- A. You have a high priority change
- B. Automatic unlocking failed
- C. You see a status message that you cannot acquire the lock
- D. Your apply failed due to a state lock
Answer: B
Explanation:
Manually unlock the state for the defined configuration.
Reference: https://www.terraform.io/docs/cli/commands/force-unlock.html
NEW QUESTION 113
When using a module block to reference a module stored on the public Terraform Module Registry such as:
How do you specify version 1.0.0?
- A. Append ?ref=v1.0.0 argument to the source path
- B. Nothing - modules stored on the public Terraform Module Registry always default to version 1.0.0
- C. Modules stored on the public Terraform Module Registry do not support versioning
- D. Add version = "1.0.0" attribute to module block
Answer: C
Explanation:
Reference: https://www.terraform.io/docs/language/modules/sources.html
NEW QUESTION 114
Which of the following is not true of Terraform providers?
- A. Some providers are maintained by HashiCorp
- B. None of the above
- C. Providers can be maintained by a community of users
- D. Major cloud vendors and non-cloud vendors can write, maintain, or collaborate on Terraform providers
- E. Providers can be written by individuals
Answer: D
NEW QUESTION 115
When you initialize Terraform, where does it cache modules from the public Terraform Module Registry?
- A. On disk in the .terraform sub-directory
- B. In memory
- C. On disk in the /tmp directory
- D. They are not cached
Answer: A
NEW QUESTION 116
Module variable assignments are inherited from the parent module and do not need to be explicitly set.
- A. False
- B. True
Answer: A
NEW QUESTION 117
If a module uses a local variable, you can expose that value with a terraform output.
- A. False
- B. True
Answer: B
Explanation:
Explanation
Output values are like function return values.
Reference: https://www.terraform.io/docs/language/values/locals.html
https://www.terraform.io/docs/language/values/outputs.html
NEW QUESTION 118
When using constraint expressions to signify a version of a provider, which of the following are valid provider versions that satisfy the expression found in the following code snippet: (select two)
1. terraform
2. {
3. required_providers
4. {
5. aws = "~> 1.2.0"
6. }
7. }
- A. 1.3.0
- B. 1.2.9
- C. 1.3.1
- D. 1.2.3
Answer: B,D
Explanation:
Explanation
As your Terraform usage becomes more advanced, there are some cases where you may need to modify the Terraform state. Rather than modify the state directly, the terraform state commands can be used in many cases instead. This command is a nested subcommand, meaning that it has further subcommands.
https://www.terraform.io/docs/commands/state/index.html
NEW QUESTION 119
You want terraform plan and terraform apply to be executed in Terraform Cloud's run environment but the output is to be streamed locally. Which one of the below you will choose?
- A. Local Backends.
- B. This can be done using any of the local or remote backends.
- C. Remote Backends.
- D. Terraform Backends.
Answer: C
Explanation:
Explanation
When using full remote operations, operations like terraform plan or terraform apply can be executed in Terraform Cloud's run environment, with log output streaming to the local terminal. Remote plans and applies use variable values from the associated Terraform Cloud workspace.
Terraform Cloud can also be used with local operations, in which case only state is stored in the Terraform Cloud backend.
https://www.terraform.io/docs/backends/types/remote.html
NEW QUESTION 120
Which of the following is the correct way to pass the value in the variable num_servers into a module with the input servers?
- A. servers = num_servers
- B. servers = variable.num_servers
- C. servers = var.num_servers
- D. servers = var(num_servers)
Answer: A
NEW QUESTION 121
During a terraform plan, a resource is successfully created but eventually fails during provisioning. What happens to the resource?
- A. the terraform plan is rolled back and all provisioned resources are removed
- B. the resource is marked as tainted
- C. Terraform attempts to provision the resource up to three times before exiting with an error
- D. it is automatically deleted
Answer: B
Explanation:
Explanation
If a resource successfully creates but fails during provisioning, Terraform will error and mark the resource as "tainted". A resource that is tainted has been physically created, but can't be considered safe to use since provisioning failed. Terraform also does not automatically roll back and destroy the resource during the apply when the failure happens, because that would go against the execution plan: the execution plan would've said a resource will be created, but does not say it will ever be deleted.
NEW QUESTION 122
What is the workflow for deploying new infrastructure with Terraform?
- A. Write a Terraform configuration, run terraform show to view proposed changes, and terraform apply to create new infrastructure.
- B. terraform plan to import the current infrastructure to the state file, make code changes, and terraform apply to update the infrastructure
- C. terraform plan to import the current infrastructure to the state file, make code changes, and terraform apply to update the infrastructure
- D. Write a Terraform configuration, run terraform init, run terraform plan to view planned infrastructure changes, and terraform apply to create new infrastructure.
Answer: C
Explanation:
Reference:
https://www.google.com/search?q=Write+a+Terraform+configuration%2C+run+terraform+init%2C
+run+terraform+plan+to+view+planned+infrastructure+changes%2C+and+terraform+apply+to+create+new
+infrastructure.&oq=Write+a+Terraform+configuration%2C+run+terraform+init%2C+run+terraform+plan+to
+view+planned+infrastructure+changes%2C+and+terraform+apply+to+create+new
+infrastructure.&aqs=chrome..69i57.556j0j7&sourceid=chrome&ie=UTF-8
NEW QUESTION 123
I78
correct?
- A. Storing state remotely can provide better security.
- B. The state file is always encrypted at rest.
- C. The Terraform state can contain sensitive data, therefore the state file should be protected from unauthorized access.
- D. Using the mask feature, you can instruct Terraform to mask sensitive data in the state file.
- E. Terraform Cloud always encrypts state at rest.
- F. When using local state, the state file is stored in plain-text.
Answer: A,C,E,F
Explanation:
Terraform state can contain sensitive data, depending on the resources in use and your definition of "sensitive." The state contains resource IDs and all resource attributes. For resources such as databases, this may contain initial passwords.
When using local state, state is stored in plain-text JSON files.
When using remote state, state is only ever held in memory when used by Terraform. It may be encrypted at rest, but this depends on the specific remote state backend.
Storing Terraform state remotely can provide better security. As of Terraform 0.9, Terraform does not persist state to the local disk when remote state is in use, and some backends can be configured to encrypt the state data at rest.
Recommendations
If you manage any sensitive data with Terraform (like database passwords, user passwords, or private keys), treat the state itself as sensitive data.
Storing state remotely can provide better security. As of Terraform 0.9, Terraform does not persist state to the local disk when remote state is in use, and some backends can be configured to encrypt the state data at rest.
For example:
* Terraform Cloud always encrypts state at rest and protects it with TLS in transit. Terraform Cloud also knows the identity of the user requesting state and maintains a history of state changes. This can be used to control access and track activity. Terraform Enterprise also supports detailed audit logging.
* The S3 backend supports encryption at rest when the encrypt option is enabled. IAM policies and logging can be used to identify any invalid access. Requests for the state go over a TLS connection.
NEW QUESTION 124
Which of the following state management command allow you to retrieve a list of resources that are part of the state file?
- A. terraform state view
- B. terraform state list
- C. terraform view
- D. terraform list
Answer: B
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 125
Which of the following is not a valid string function in Terraform?
- A. slice
- B. join
- C. split
- D. chomp
Answer: D
Explanation:
Explanation/Reference: https://www.terraform.io/docs/language/functions/chomp.html
NEW QUESTION 126
Select all Operating Systems that Terraform is available for. (select five)
- A. Unix
- B. FreeBSD
- C. Solaris
- D. macOS
- E. Linux
- F. Windows
Answer: B,C,D,E,F
Explanation:
Explanation
Terraform is available for macOS, FreeBSD, OpenBSD, Linux, Solaris, Windows
https://www.terraform.io/downloads.html
NEW QUESTION 127
Which of the following is not a valid Terraform collection type?
- A. list
- B. map
- C. set
- D. tree
Answer: D
NEW QUESTION 128
By default, a defined provisioner is a creation-time provisioner.
- A. False
- B. True
Answer: B
Explanation:
https://www.terraform.io/docs/provisioners/index.html
NEW QUESTION 129
......
TA-002-P [Jan-2022] Newly Released] Exam Questions For You To Pass: https://www.latestcram.com/TA-002-P-exam-cram-questions.html
HashiCorp TA-002-P Exam: Basic Questions With Answers: https://drive.google.com/open?id=1LiOP8oYJFqQ16vehgxR_Z5WfNmpZsAhs
