
[UPDATED 2024] HashiCorp TA-002-P Questions Prepare with Free Demo of PDF
NEW 2024 Certification Sample Questions TA-002-P Dumps & Practice Exam
NEW QUESTION # 22
FILL BLANK
You need to specify a dependency manually.
What resource meta-parameter can you use to make sure Terraform respects the dependency?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.
Answer:
Explanation:
the local_file data source
Reference: https://www.terraform.io/docs/language/functions/file.html
NEW QUESTION # 23
In Terraform Enterprise, a workspace can be mapped to how many VCS repos?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: D
Explanation:
Explanation
A workspace can only be configured to a single VCS repo, however, multiple workspaces can use the same repo.
https://www.terraform.io/docs/cloud/workspaces/vcs.html
NEW QUESTION # 24
What information does the public Terraform Module Registry automatically expose about published modules?
- A. Required input variables
- B. None of the above
- C. Outputs
- D. Optional inputs variables and default values
- E. All of the above
Answer: B
NEW QUESTION # 25
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 # 26
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 not recreated
- B. destroyed and recreated
- C. tainted and not destroyed
- D. recreated and tainted
Answer: B
NEW QUESTION # 27
During a terraform plan, a resource is successfully created but eventually fails during provisioning. What happens to the resource?
- A. it is automatically deleted
- B. the terraform plan is rolled back and all provisioned resources are removed
- C. the resource is marked as tainted
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. - D. Terraform attempts to provision the resource up to three times before exiting with an error
Answer: C
NEW QUESTION # 28
Provider dependencies are created in several different ways. Select the valid provider dependencies from the following list: (select three)
- A. Existence of any provider plugins found locally in the working directory.
- B. Use of any resource belonging to a particular provider in a resource or data block in configuration.
- C. Existence of any resource instance belonging to a particular provider in the current state.
- D. Explicit use of a provider block in configuration, optionally including a version constraint.
Answer: B,C,D
Explanation:
The existence of a provider plugin found locally in the working directory does not itself create a provider dependency. The plugin can exist without any reference to it in the terraform configuration. https://www.terraform.io/docs/commands/providers.html
NEW QUESTION # 29
Terraform Enterprise currently supports running under which the following operating systems?
- A. Oracle Linux
- B. Debian
- C. Amazon Linux
- D. Red Hat Enterprise Linux
- E. CentOS
- F. Ubuntu
Answer: A,B,C,D,E,F
Explanation:
Explanation
Terraform Enterprise runs on Linux instances, and you must prepare a running Linux instance for Terraform
Enterprise before running the installer. You will start and manage this instance like any other server.
Terraform Enterprise currently supports running under the following operating systems:
Standalone deployment:
Debian 7.7+
Ubuntu 14.04.5 / 16.04 / 18.04
Red Hat Enterprise Linux 7.4 - 7.8
CentOS 6.x / 7.4 - 7.8
Amazon Linux 2014.03 / 2014.09 / 2015.03 / 2015.09 / 2016.03 / 2016.09 / 2017.03 / 2017.09 / 2018.03 / 2.0
Oracle Linux 7.4 - 7.8
https://www.terraform.io/docs/enterprise/before-installing/index.html
NEW QUESTION # 30
Which of the following statements best describes the Terraform list(...) type?
- A. a collection of values where each is identified by a string label.
- B. a collection of named attributes that each have their own type.
Explanation
A terraform list is a sequence of values identified by consecutive whole numbers starting with zero. https://www.terraform.io/docs/configuration/types.html#structural-types - C. a collection of unique values that do not have any secondary identifiers or ordering.
- D. a sequence of values identified by consecutive whole numbers starting with zero.
Answer: D
NEW QUESTION # 31
Why should secrets not be hard coded into Terraform code? Choose two correct answers
- A. All passwords should be rotated on a quarterly basis.
- B. It makes the code less reusable.
- C. Terraform code is typically stored in version control, as well as copied to the systems from h it's run.
Any of those may not have robust security mechanisms. - D. The Terraform code is copied to the target resources to be applied locally and could expose secrets if a
target resource is compromised.
Answer: C,D
NEW QUESTION # 32
You have a Terraform configuration that defines a single virtual machine with no references to it, You have run terraform apply to create the resource, and then removed the resource definition from your Terraform configuration file.
What will happen you run terraform apply in the working directory again?
- A. Terraform will remove the virtual machine from the state file, but the resource will still exist
- B. Terraform will error
- C. Terraform will destroy the virtual machine
- D. Nothing
Answer: C
Explanation:
This is what will happen if you run terraform apply in the working directory again, after removing the resource definition from your Terraform configuration file. Terraform will detect that there is a resource in the state file that is not present in the configuration file, and will assume that you want to delete it.
NEW QUESTION # 33
What does the default "local" Terraform backend store?
- A. Terraform binary
- B. Provider plugins
- C. tfplan files
- D. State file
Answer: D
Explanation:
The default "local" Terraform backend stores the state file in a local file named terraform.tfstate, which can be used to track and manage the state of your infrastructure3.
NEW QUESTION # 34
Hanah is writing a terraform configuration with nested modules, there are multiple places where she has to use the same conditional expression but she wants to avoid repeating the same values or expressions multiple times in the configuration,. What is a better approach to dealing with this?
- A. Variables
- B. Expressions
- C. Functions
- D. Local Values
Answer: D
Explanation:
Explanation
https://www.terraform.io/docs/configuration/locals.html
NEW QUESTION # 35
Terraform Cloud is more powerful when you integrate it with your version control system (VCS) provider. Select all the supported VCS providers from the answers below. (select four)
- A. Azure DevOps Server
- B. GitHub Enterprise
- C. GitHub
- D. Bitbucket Cloud
- E. CVS Version Control
Answer: A,B,C,D
Explanation:
Explanation
Terraform Cloud supports the following VCS providers:
- https://www.terraform.io/docs/cloud/vcs/github.html
- https://www.terraform.io/docs/cloud/vcs/github.html
- https://www.terraform.io/docs/cloud/vcs/github-enterprise.html
- https://www.terraform.io/docs/cloud/vcs/gitlab-com.html
- https://www.terraform.io/docs/cloud/vcs/gitlab-eece.html
- https://www.terraform.io/docs/cloud/vcs/bitbucket-cloud.html
- https://www.terraform.io/docs/cloud/vcs/bitbucket-server.html
- https://www.terraform.io/docs/cloud/vcs/azure-devops-server.html
- https://www.terraform.io/docs/cloud/vcs/azure-devops-services.html
https://www.terraform.io/docs/cloud/vcs/index.html#supported-vcs-providers
NEW QUESTION # 36
True or False? When using the Terraform provider for Vault, the tight integration between these HashiCorp tools provides the ability to mask secrets in the terraform plan and state files.
- A. True
- B. False
Answer: B
Explanation:
Currently, Terraform has no mechanism to redact or protect secrets that are returned via data sources, so secrets read via this provider will be persisted into the Terraform state, into any plan files, and in some cases in the console output produced while planning and applying. These artifacts must, therefore, all be protected accordingly.
NEW QUESTION # 37
You have created an AWS EC2 instance of type t2.micro through your terraform configuration file ec2.tf .
Now you want to change the instance type from t2.micro to t2.medium. Accordingly you have changed your configuration file and and ran terraform plan. After running terraform plan you check the output and saw one instance will be updated from t2.micro --> t2.medium. After this you went to grab a coffee without running terraform apply and meanwhile a member of your team changed the instance type of that EC2 instance to t2.medium from aws console. After coming to your desk you run terraform apply. What will happen?
- A. terraform apply will through an error.
- B. The instance type will be changed to t2.micro and again will be changed to t2.medium
- C. 1 resource will be updated and you will see the message : Apply Complete ! Resources : 0 added, 1 changed, 0 destroyed.
- D. No resource will be updated and you will see the message : Apply Complete ! Resources : 0 added, 0 changed, 0 destroyed.
Answer: D
NEW QUESTION # 38
......
TA-002-P Deluxe Study Guide with Online Test Engine: https://testking.itexamsimulator.com/TA-002-P-brain-dumps.html

