Try Free and Start Using Realistic Verified TA-002-P Dumps Instantly
TA-002-P Actual Questions - Instant Download 94 Questions
The HashiCorp TA-002-P exam is composed of 60 multiple-choice questions that are designed to test the candidate's knowledge of Terraform fundamentals, including how to write and manage Terraform configurations, how to use Terraform to provision infrastructure, and how to work with Terraform modules. TA-002-P exam also covers topics such as Terraform providers, state management, and best practices for using Terraform in production environments.
HashiCorp TA-002-P exam is an essential certification for individuals who want to pursue a career in cloud infrastructure management using Terraform. It validates one's understanding of Terraform and its ability to provision and manage infrastructure on various cloud platforms. With this certification, individuals can demonstrate their expertise in Terraform and stand out in the job market as a competent infrastructure manager.
HashiCorp TA-002-P exam is an online exam that consists of 60 multiple-choice questions. Candidates who pass the exam will be certified as a HashiCorp Certified: Terraform Associate. HashiCorp Certified: Terraform Associate certification is valid for two years and can be renewed by passing the exam again or by earning a higher-level certification. TA-002-P exam is an excellent way for professionals to demonstrate their expertise in Terraform and their ability to design, implement, and manage infrastructure in a cloud environment. By passing the exam, candidates can improve their career opportunities and demonstrate their commitment to their profession.
NEW QUESTION # 39
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
- A. It will happen automatically
- B. Run terraform import
- C. Run terraform refresh
- D. Manually update the state fire
Answer: A
NEW QUESTION # 40
If a module uses a local variable, you can expose that value with a terraform output.
- A. True
- B. False
Answer: A
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 # 41
1. resource "aws_s3_bucket" "example" {
2. bucket = "my-test-s3-terraform-bucket"
3. ...} resource "aws_iam_role" "test_role" {
4. name = "test_role"
5. ...}
Due to the way that the application code is written, the s3 bucket must be created before the test role is created, otherwise there will be a problem. How can you ensure that?
- A. This is not possible to control in terraform . Terraform will take care of it in a native way , and create a dependency graph that is best suited for the parallel resource creation.
- B. Add explicit dependency using depends_on . This will ensure the correct order of resource creation.
- C. This will already be taken care of by terraform native implicit dependency. Nothing else needs to be done from your end.
- D. Create 2 separate terraform config scripts , and run them one by one , 1 for s3 bucket , and another for IAM role , run the S3 bucket script first.
Answer: B
Explanation:
Implicit dependency works only if there is some reference of one resource to another. Explicit dependency is the option here.
NEW QUESTION # 42
Why is it a good idea to declare the required version of a provider in a Terraform configuration file?
1. terraform
2. {
3. required_providers
4. {
5. aws = "~> 1.0"
6. }
7. }
- A. To ensure that the provider version matches the version of Terraform you are using.
- B. Providers are released on a separate schedule from Terraform itself; therefore a newer version could
introduce breaking changes. - C. To match the version number of your application being deployed via Terraform.
- D. To remove older versions of the provider.
Answer: B
NEW QUESTION # 43
As a developer, you want to ensure your plugins are up to date with the latest versions. Which Terraform
command should you use?
- A. terreform apply -upgrade
- B. terreform refresh -upgrade
- C. terreform providers- upgrade
- D. terreformn lnit -upgrade
Answer: D
NEW QUESTION # 44
Which of the following is not a valid Terraform string function?
- A. replace
- B. join
- C. format
- D. tostring
Answer: D
Explanation:
https://www.terraform.io/docs/configuration/functions/tostring.html
NEW QUESTION # 45
In terraform, most resource dependencies are handled automatically. Which of the following statements
describes best how terraform resource dependencies are handled?
- A. The terraform binary contains a built-in reference map of all defined Terraform resource dependencies.
Updates to this dependency map are reflected in terraform versions. To ensure you are working with the
latest resource dependency map you much be running the latest version of Terraform. - B. Resource dependencies are identified and maintained in a file called resource.dependencies. Each
terraform provider is required to maintain a list of all resource dependencies for the provider and it's
included with the plugin during initialization when terraform init is executed. The file is located in the
terraform.d folder. - C. Resource dependencies are handled automatically by the depends_on meta_argument, which is set to
true by default. - D. Terraform analyses any expressions within a resource block to find references to other objects, and
treats those references as implicit ordering requirements when creating, updating, or destroying
resources.
Answer: D
Explanation:
Explanation
https://www.terraform.io/docs/configuration/resources.html
NEW QUESTION # 46
Why would you use the terraform taint command?
- A. When you want to force Terraform to destroy a resource on the next apply
- B. When you want Terraform to ignore a resource on the next apply
- C. When you want to force Terraform to destroy and recreate a resource on the next apply
- D. When you want Terraform to destroy all the infrastructure in your workspace
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.
Reference: https://www.terraform.io/docs/cli/commands/taint.html
NEW QUESTION # 47
A Terraform backend determines how Terraform loads state and stores updates when you execute
___________.
- A. None of the above
- B. apply
- C. taint
- D. All of the above
- E. destroy
Answer: D
NEW QUESTION # 48
Mary has created a database instance in AWS and for ease of use is outputting the value of the database password with the following code:
1. output "db_password"
2. {
3. value = local.db_password
4. }
Mary wants to hide the output value in the CLI after terraform apply? What is the best way?
- A. Use sensitive parameter
- B. Encrypt the value using encrypt() function
- C. Use secure parameter
- D. Use cryptographic hash
Answer: A
NEW QUESTION # 49
State locking does not happen automatically and must be specified at run
- A. True
- B. False
Answer: B
Explanation:
State locking happens automatically on all operations that could write state.
https://www.terraform.io/docs/state/locking.html
NEW QUESTION # 50
You would like to reuse the same Terraform configuration for your development and production environments with a different state file for each.
Which command would you use?
- A. terraform init
- B. terraform state
- C. terraform workspace
- D. terraform import
Answer: A
NEW QUESTION # 51
Your company has a lot of workloads in AWS , and Azure that were respectively created using
CloudFormation , and AzureRM Templates. However , now your CIO has decided to use Terraform for all
new projects , and has asked you to check how to integrate the existing environment with terraform code.
What should be your next plan of action?
- A. This is only possible in Terraform Enterprise , which has the TerraformConverter exe that can take any
other template language like AzureRM and convert to Terraform code. - B. Just write the terraform config file for the new resources , and run terraform apply , the state file will
automatically be updated with the details of the new resources to be imported. - C. Tell the CIO that this is not possible . Resources created in CloudFormation , and AzureRM templates
cannot be tracked using terraform. - D. Use terraform import command to import each resource one by one .
Answer: D
NEW QUESTION # 52
You decide to move a Terraform state file to Amazon S3 from another location. You write the code below into a file called\
You immediately run terraform apply but don't see any changes. Your state file didn't move. Which command will migrate your current state file to the new S3 remote backend?
- A. terraform init
- B. terraform refresh
- C. terraform push
- D. terraform state
Answer: A
NEW QUESTION # 53
Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?
- A. terraform fmt -write-false
- B. terraform fmt -check -recursive
- C. terraform fmt -check
- D. terraform fmt -list -recursive
Answer: B
Explanation:
This command will check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes, and will return a non-zero exit code if any files need formatting. The other commands will either make changes, list the files that need formatting, or not check the modules.
NEW QUESTION # 54
When Terraform needs to be installed in a location where it does not have internet access to download the
installer and upgrades, the installation is generally known as to be __________.
- A. disconnected
- B. a private install
- C. non-traditional
- D. air-gapped
Answer: C
Explanation:
Explanation
A Terraform Enterprise install that is provisioned on a network that does not have Internet access is generally
known as an air-gapped install. These types of installs require you to pull updates, providers, etc. from external
sources vs. being able to download them directly.
NEW QUESTION # 55
What is a downside to using the Vault provider to read secrets from Vault?
- A. Secrets are persisted to the state file and plans.
- B. Terraform requires a unique auth method to work with Vault.
- C. Terraform and Vault must be running on the same version.
- D. Terraform and Vault must be running on the same physical host.
Answer: A
Explanation:
The Vault provider allows Terraform to read from, write to, and configure Hashicorp Vault.
Interacting with Vault from Terraform causes any secrets that you read and write to be persisted in both Terraform's state file and in any generated plan files. For any Terraform module that reads or writes Vault secrets, these files should be treated as sensitive and protected accordingly.
NEW QUESTION # 56
You want to define multiple data disks as nested blocks inside the resource block for a virtual machine. What Terraform feature would help you define the blocks using the values in a variable?
- A. Dynamic blocks
- B. Collection functions
- C. Local values
- D. Count arguments
Answer: A
NEW QUESTION # 57
You run a local-exec provisioner in a null resource called null_resource.run_script and realize that you need to rerun the script.
Which of the following commands would you use first?
- A. terraform validate null_resource.run_script
- B. terraform plan -target=null_resource.run_script
- C. terraform apply -target=null_resource.run_script
- D. terraform taint null_resource.run_script
Answer: D
NEW QUESTION # 58
Select two answers to complete the following sentence: Before a new provider can be used, it must be ______
and _______.
- A. declared in the configuration
- B. uploaded to source control
- C. initialized
- D. approved by HashiCorp
Answer: A,C
Explanation:
Explanation
Each time a new provider is added to configuration -- either explicitly via a provider block or by adding a
resource from that provider -- Terraform must initialize the provider before it can be used. Initialization
downloads and installs the provider's plugin so that it can later be executed.
NEW QUESTION # 59
You want to get involved in the development of Terraform. As this is an open source project, you would like to contribute a fix for an open issue of Terraform. What programming language will need to use to write the fix?
- A. Java
- B. Python
- C. It depends on which command issue related to.
- D. Go
Answer: D
Explanation:
Explanation
Basic programming knowledge. Terraform and Terraform Plugins are written in the Go programming language, but even if you've never written a line of Go before, you're still welcome to take a dive into the code and submit patches. The community is happy to assist with code reviews and offer guidance specific to Go.
NEW QUESTION # 60
......
Download Free Latest Exam TA-002-P Certified Sample Questions: https://www.verifieddumps.com/TA-002-P-valid-exam-braindumps.html
Prepare for your exam certification with our TA-002-P Certified HashiCorp: https://drive.google.com/open?id=1r6TkpmOgsZbdDRWoM6v8UsBTEqul0szE
