
TA-002-P PDF Download Mar-2024 HashiCorp Test To Gain Brilliante Result!
Provide Updated HashiCorp TA-002-P Dumps as Practice Test and PDF
NEW QUESTION # 24
The following is a snippet from a Terraform configuration file:
Which, when validated, results in the following error:
Fill in the blank in the error message with the correct string from the list below.
- A. multi
- B. alias
- C. version
- D. label
Answer: B
Explanation:
https://www.terraform.io/docs/configuration/providers.html#alias-multiple-providerinstances
NEW QUESTION # 25
Which of the following terraform subcommands could be used to remove the lock on the state for the current
configuration?
- A. Removing the lock on a state file is not possible
- B. force-unlock
- C. state-unlock
- D. Unlock
Answer: B
Explanation:
Explanation
https://www.terraform.io/docs/commands/force-unlock.html
NEW QUESTION # 26
During a terraform plan, a resource is successfully created but eventually fails during provisioning. What happens to the resource?
- A. the resource is marked as tainted
- B. Terraform attempts to provision the resource up to three times before exiting with an error
- C. the terraform plan is rolled back and all provisioned resources are removed
- D. it is automatically deleted
Answer: A
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 # 27
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:
dependson
NEW QUESTION # 28
A fellow developer on your team is asking for some help in refactoring their Terraform code. As part of their application's architecture, they are going to tear down an existing deployment managed by Terraform and deploy new. However, there is a server resource named aws_instance.ubuntu[1] they would like to keep to perform some additional analysis.
What command should be used to tell Terraform to no longer manage the resource?
- A. terraform apply rm aws_instance.ubuntu[1]
- B. terraform delete aws_instance.ubuntu[1]
- C. terraform state rm aws_instance.ubuntu[1]
- D. terraform plan rm aws_instance.ubuntu[1]
Answer: C
NEW QUESTION # 29
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:
thelocalfiledatasource
NEW QUESTION # 30
A user has created three workspaces using the command line - prod, dev, and test. The user wants to create a fourth workspace named stage. Which command will the user execute to accomplish this?
- A. terraform workspace new stage
- B. terraform workspace -new stage
- C. terraform workspace -create stage
- D. terraform workspace create stage
Answer: A
Explanation:
The terraform workspace new command is used to create a new workspace.
https://www.terraform.io/docs/commands/workspace/new.html
NEW QUESTION # 31
Multiple configurations for the same provider can be used in a single configuration file.
- A. False
- B. True
Answer: B
Explanation:
Explanation
You can optionally define multiple configurations for the same provider, and select which one to use on a
per-resource or per-module basis. The primary reason for this is to support multiple regions for a cloud
platform; other examples include targeting multiple Docker hosts, multiple Consul hosts, etc.
To include multiple configurations for a given provider, include multiple provider blocks with the same
provider name, but set the alias meta-argument to an alias name to use for each additional configuration. For
example:
# The default provider configuration
provider "aws" {
region = "us-east-1"
}
# Additional provider configuration for west coast region
provider "aws" {
alias = "west"
region = "us-west-2"
}
The provider block without alias set is known as the default provider configuration. When alias is set, it
creates an additional provider configuration. For providers that have no required configuration arguments, the
implied empty configuration is considered to be the default provider configuration.
https://www.terraform.io/docs/configuration/providers.html#alias-multiple-provider-instances
NEW QUESTION # 32
Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into syslog.
- A. False
- B. True
Answer: A
Explanation:
Explanation
TF_LOG_PATH IS NOT REQUIRED, in the docs, they do not mention HAVE TO SET TF_LOG_PATH, it
is optional, therefore without TF_LOG_PATH will cause detailed logs to appear on stderr.
https://www.computerhope.com/jargon/s/stderr.htm#:~:text=Stderr%2C%20also%20known%20as%20standard,d
NEW QUESTION # 33
Which of the following is not a valid string function in Terraform?
- A. join
- B. chomp
- C. split
- D. slice
Answer: B
Explanation:
Explanation/Reference: https://www.terraform.io/docs/language/functions/chomp.html
NEW QUESTION # 34
Where does the Terraform local backend store its state?
- A. In the terraform.tfstate file
- B. In the user's .terraformrc file
- C. In the terraform.tfvars file
- D. In the /tmp directory
Answer: A
Explanation:
Explanation
https://www.terraform.io/language/state
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 # 35
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 cryptographic hash
- B. Encrypt the value using encrypt() function
- C. Use sensitive parameter
- D. Use secure parameter
Answer: C
NEW QUESTION # 36
Terraform requires the Go runtime as a prerequisite for installation.
- A. False
- B. True
Answer: A
Explanation:
Explanation
Explanation/Reference: https://www.terraform.io/docs/extend/guides/v1-upgrade-guide.html
NEW QUESTION # 37
Select the feature below that best completes the sentence:
The following list represents the different types of __________ available in Terraform.
1. max
2. min
3. join
4. replace
5. list
6. length
7. range
- A. Functions
- B. Backends
- C. Data sources
- D. Named values
Answer: A
Explanation:
Explanation
The Terraform language includes a number of built-in functions that you can call from within expressions to transform and combine values. The Terraform language does not support user-defined functions, and only the functions built into the language are available for use.
https://www.terraform.io/docs/configuration/functions.html
NEW QUESTION # 38
Which of the following is true about terraform apply? (Choose two.)
- A. You cannot target specific resources for the operation
- B. Depending on provider specification, Terraform may need to destroy and recreate your infrastructure
resources - C. By default, it does not refresh your state file to reflect current infrastructure configuration
- D. It only operates on infrastructure defined in the current working directory or workspace
- E. You must pass the output of a terraform plan command to it
Answer: B,D
Explanation:
Explanation
https://www.terraform.io/cli/run
NEW QUESTION # 39
terraform validate validates the syntax of Terraform files.
- A. False
- B. True
Answer: B
Explanation:
Explanation
The terraform validate command validates the syntax and arguments of the Terraform configuration files.
Reference: https://www.terraform.io/docs/cli/code/index.html
NEW QUESTION # 40
Which of the following clouds does not have a provider maintained HashiCorp?
- A. OpenStack
- B. IBM Cloud
- C. AWS
- D. DigitalOcean
Answer: B
Explanation:
Explanation
IBM Cloud does not have a provider maintained by HashiCorp, although IBM Cloud does maintain their own
Terraform provider.
https://www.terraform.io/docs/providers/index.html
NEW QUESTION # 41
Which of the following is not a valid string function in Terraform?
- A. slice
- B. chomp
- C. join
- D. split
Answer: A
NEW QUESTION # 42
Select the operating systems which are supported for a clustered Terraform Enterprise: (select four)
- A. Unix
- B. Ubuntu
- C. Red Hat
- D. Amazon Linux
- E. CentOS
Answer: B,C,D,E
Explanation:
Explanation
https://www.terraform.io/docs/enterprise/before-installing/index.html#operating-systemrequirements
NEW QUESTION # 43
......
TA-002-P Dumps are Available for Instant Access: https://www.testpdf.com/TA-002-P-exam-braindumps.html
Valid TA-002-P Dumps for Helping Passing TA-002-P Exam!: https://drive.google.com/open?id=1CKP6gaTrKTWhKgJQ_h3q4EmPFQTXMJoS
