[Apr 06, 2024] 100% Pass Guarantee for TA-002-P Dumps with Actual Exam Questions
Today Updated TA-002-P Exam Dumps Actual Questions
HashiCorp TA-002-P certification exam is an excellent way to validate your skills and knowledge of Terraform. It is suitable for IT professionals who are new to Terraform or already working with Terraform in their daily tasks. Passing the exam will demonstrate your expertise in Terraform, improve your job prospects, and lead to higher salaries.
NEW QUESTION # 36
What is the name assigned by Terraform to reference this resource?
- A. google
- B. compute_instance
- C. test
- D. main
Answer: D
NEW QUESTION # 37
In a Terraform Cloud workspace linked to a version control repository, speculative plan runs start
automatically when you merge or commit changes to version control.
- A. True
- B. False
Answer: B
NEW QUESTION # 38
Your developers are facing a lot of problem while writing complex expressions involving difficult interpolations . They have to run the terraform plan every time and check whether there are errors , and also check terraform apply to print the value as a temporary output for debugging purposes. What should be done to avoid this?
- A. Use terraform zipmap function , it will be able to easily do the interpolations without complex code.
- B. Use terraform console command to have an interactive UI with full access to the underlying terraform state to run your interpolations , and debug at real-time.
- C. Use terraform console command to have an interactive UI , but you can only use it with local state , and it does not work with remote state.
- D. Add a breakpoint in your code, using the watch keyword , and output the value to console for temporary debugging.
Answer: B
Explanation:
The terraform console command provides an interactive console for evaluating expressions. This is useful for testing interpolations before using them in configurations, and for interacting with any values currently saved in state.
https://www.terraform.io/docs/commands/console.html
NEW QUESTION # 39
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 taint
- B. terraform refresh
- C. terraform destroy
- D. terraform recreate
Answer: A
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 # 40
Which of the following is available only in Terraform Enterprise or Cloud workspaces and not in Terraform
CLI?
- A. Using the workspace as a data source
- B. Secure variable storage
- C. Support for multiple cloud providers
- D. Dry runs with terraform plan
Answer: B
Explanation:
Reference: https://www.terraform.io/docs/language/providers/configuration.html
NEW QUESTION # 41
Which of the following can you do with terraform plan? Choose two correct answers.
- A. Execute a plan in a different workspace
- B. Save a generated execution plan to apply later
- C. View the execution plan and check if the changes match your expectations
- D. Schedule Terraform to run at a planned time in the future
Answer: B,C
NEW QUESTION # 42
HashiCorp offers multiple versions of Terraform, including Terraform open-source, Terraform Cloud, and Terraform Enterprise. Which of the following Terraform features are only available in the Enterprise edition?
(select four)
- A. SAML/SSO
- B. Sentinel
- C. Clustering
- D. Private Module Registry
- E. Private Network Connectivity
- F. Audit Logs
Answer: A,E,F
Explanation:
Explanation
While there are a ton of features that are available to open source users, many features that are part of the Enterprise offering are geared towards larger teams and enterprise functionality. To see what specific features are part of Terraform Cloud and Terraform Enterprise, check out this link.
https://www.hashicorp.com/products/terraform/pricing/
NEW QUESTION # 43
How does Terraform handle working with so many providers?
- A. Terraform ships with all of the plugins embedded in the Terraform binary.
- B. Terraform uses a plugin architecture for providers and only installs the provider plugins required by your configuration in a shared, system-wide plugins directory.
- C. Terraform uses a plugin architecture for providers and only installs the provider plugins required by your configuration in the configuration's working directory.
- D. Terraform allows you to select the providers you want to support during the Terraform installation process.
Answer: C
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.
NEW QUESTION # 44
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. Remote Backends.
- C. This can be done using any of the local or remote backends.
- D. Terraform Backends.
Answer: B
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 # 45
Eric needs to make use of module within his terraform code. Should the module always be public and open-source to be able to be used?
- A. True
- B. False
Answer: B
Explanation:
Explanation
Terraform module need not be public and open-source. Module can be placed in -
* Local paths
* Terraform Registry
* GitHub
* Bitbucket
* Generic Git, Mercurial repositories
* HTTP URLs
* S3 buckets
* GCS buckets
https://www.terraform.io/docs/modules/sources.html
NEW QUESTION # 46
If you delete a remote backend from the configuration, will you need to rebuild your state files locally?
- A. True
- B. False
Answer: B
Explanation:
Explanation
You can change your backend configuration at any time. You can change both the configuration itself as well
as the type of backend (for example from "consul" to "s3").
Terraform will automatically detect any changes in your configuration and request a reinitialization. As part of
the reinitialization process, Terraform will ask if you'd like to migrate your existing state to the new
configuration. This allows you to easily switch from one backend to another.
https://www.terraform.io/docs/backends/config.html#changing-configuration
NEW QUESTION # 47
After creating a new workspace "PROD" you need to run the command terraform select PROD to switch to it.
- A. True
- B. False
Answer: B
Explanation:
Explanation
By default, when you create a new workspace you are automatically switched to it To create a new workspace and switch to it, you can use terraform workspace new <new_workspace_name>; to switch to a existing workspace you can use terraform workspace select <existing_workspace_name>; Example:
$ terraform workspace new example
Created and switched to workspace "example"!
You're now on a new, empty workspace. Workspaces isolate their state, so if you run "terraform plan" Terraform will not see any existing state for this configuration.
NEW QUESTION # 48
The Terraform language does not support user-defined functions, and so only the functions built in to the
language are available for use.
- A. True
- B. False
Answer: A
Explanation:
Explanation
https://www.terraform.io/docs/configuration/functions.html
NEW QUESTION # 49
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
- A. Manually update the state fire
- B. Run terraform import
- C. Run terraform refresh
- D. It will happen automatically
Answer: D
NEW QUESTION # 50
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 publicly with any user of Terraform
- C. The ability to tag modules by version or release
- D. The ability to share modules with public Terraform users and members of Terraform Enterprise Organizations
Answer: B
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.
Reference: https://www.terraform.io/docs/language/modules/sources.html
NEW QUESTION # 51
What are some of the problems of how infrastructure was traditionally managed before Infrastructure as Code? (select three)
- A. Pointing and clicking in a management console is a scalable approach and reduces human error as businesses are moving to a multi-cloud deployment model
- B. Traditionally managed infrastructure can't keep up with cyclic or elastic applications
- C. Traditional deployment methods are not able to meet the demands of the modern business where resources tend to live days to weeks, rather than months to years
- D. Requests for infrastructure or hardware required a ticket, increasing the time required to deploy applications
Answer: B,C,D
Explanation:
Businesses are making a transition where traditionally-managed infrastructure can no longer meet the demands of today's businesses. IT organizations are quickly adopting the public cloud, which is predominantly API-driven. To meet customer demands and save costs, application teams are architecting their applications to support a much higher level of elasticity, supporting technology like containers and public cloud resources. These resources may only live for a matter of hours; therefore the traditional method of raising a ticket to request resources is no longer a viable option Pointing and clicking in a management console is NOT scale and increases the change of human error.
NEW QUESTION # 52
Which of the following Terraform commands will automatically refresh the state unless supplied with additional flags or arguments? Choose TWO correct answers.
- A. terraform validate
- B. terraform state
- C. terraform plan
- D. terraform output
- E. terraform apply
Answer: C,E
NEW QUESTION # 53
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. The instance type will be changed to t2.micro and again will be changed to t2.medium
- B. terraform apply will through an error.
- C. No resource will be updated and you will see the message : Apply Complete ! Resources : 0 added, 0 changed, 0 destroyed.
- D. 1 resource will be updated and you will see the message : Apply Complete ! Resources : 0 added, 1 changed, 0 destroyed.
Answer: C
NEW QUESTION # 54
Anyone can publish and share modules on the Terraform Public Module Registry, and meeting the requirements for publishing a module is extremely easy. Select from the following list all valid requirements. (select three)
- A. The module must be PCI/HIPPA compliant.
- B. Release tag names must be for the format x.y.z, and can optionally be prefixed with a v .
- C. Module repositories must use this three-part name format, terraform-- .
- D. The module must be on GitHub and must be a public repo.
- E. The registry uses tags to identify module versions.
Answer: B,D,E
Explanation:
https://www.terraform.io/docs/registry/modules/publish.html#requirements
NEW QUESTION # 55
You need to specify a dependency manually. What resource meta-parameter can you use lo make sure
Terraform respects thee 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:
depends_on
NEW QUESTION # 56
What information does the public Terraform Module Registry automatically expose about published modules?
- A. None of the above
- B. Outputs
- C. Optional inputs variables and default values
- D. Required input variables
- E. All of the above
Answer: E
Explanation:
Explanation
https://www.terraform.io/registry/modules/publish
"The registry extracts information about the module from the module's source. The module name, provider,
documentation, inputs/outputs, and dependencies are all parsed and available via the UI or API, as well as the
same information for any submodules or examples in the module's source repository."
NEW QUESTION # 57
How does the Terraform cloud integration differ from other state backends such as S3, Consul,etc?
- A. All of the above
- B. It can execute Terraform runs on dedicated infrastructure in Terraform Cloud
- C. It is only arable lo paying customers
- D. It doesn't show the output of a terraform apply locally
Answer: B
Explanation:
This is how the Terraform Cloud integration differs from other state backends such as S3, Consul, etc., as it allows you to perform remote operations on Terraform Cloud's servers instead of your local machine. The other options are either incorrect or irrelevant.
NEW QUESTION # 58
Complete the following sentence:
The terraform state command can be used to ____
- A. There is no such command
- B. refresh state
- C. view state
- D. modify state
Answer: D
Explanation:
https://www.terraform.io/docs/commands/state/index.html
NEW QUESTION # 59
......
HashiCorp TA-002-P certification exam is designed for IT professionals who want to validate their skills and knowledge of Terraform. TA-002-P exam is suitable for those who are new to Terraform or already working with Terraform in their daily tasks. HashiCorp Certified: Terraform Associate certification confirms that you have the skills required to use Terraform to manage infrastructure, including single machines and complex multi-cloud deployments.
By earning the HashiCorp Certified: Terraform Associate certification, professionals can showcase their ability to use Terraform to automate infrastructure management and increase operational efficiency. HashiCorp Certified: Terraform Associate certification is also a great way to demonstrate expertise in DevOps practices and cloud infrastructure management, making it a valuable asset for IT professionals looking to advance their careers. Passing the exam requires a strong understanding of Terraform concepts and hands-on experience using the tool to deploy and manage infrastructure.
TA-002-P exam dumps with real HashiCorp questions and answers: https://examcollection.bootcamppdf.com/TA-002-P-exam-actual-tests.html