
Latest [Feb 17, 2022] HashiCorp TA-002-P Exam Practice Test To Gain Brilliante Result
Take a Leap Forward in Your Career by Earning HashiCorp TA-002-P
How to schedule HashiCorp Certified: Terraform Associate TA-002-P Professional Exam
To apply for the HashiCorp Certified: Terraform Associate TA-002-P Professional Exam, You have to follow these steps:
⢠Step 1: Go to the HashiCorp Certified: Terraform Associate TA-002-P Professional Official Site. You must first create an account, use your email address to register. You must purchase your training through your local distributor. If you are a partner, you must first create an account on the Partner Portal. You must use your company email address to register. ⢠Step 2: Read the instruction Carefully ⢠Step 3: Follow the given steps ⢠Step 4: Apply for the HashiCorp Certified: Terraform Associate TA-002-P-Professional Exam
NEW QUESTION 183
In order to make a Terraform configuration file dynamic and/or reusable, static values should be converted to use what?
- A. Input Parameters
- B. Regular Expressions
- C. Module
- D. Output Value
Answer: A
Explanation:
Input variables serve as parameters for a Terraform module, allowing aspects of the module to be customized without altering the module's own source code, and allowing modules to be shared between different configurations.
https://www.terraform.io/docs/configuration/variables.html
NEW QUESTION 184
What kind of resource dependency is stored in terraform.tfstate file?
- A. Only explicit dependencies are stored in state file.
- B. Only implicit dependencies are stored in state file.
- C. No dependency information is stored in state file.
- D. Both implicit and explicit dependencies are stored in state file.
Answer: D
Explanation:
Terraform state captures all dependency information, both implicit and explicit. One purpose for state is to determine the proper order to destroy resources. When resources are created all of their dependency information is stored in the state. If you destroy a resource with dependencies, Terraform can still determine the correct destroy order for all other resources because the dependencies are stored in the state.
https://www.terraform.io/docs/state/purpose.html#metadata
NEW QUESTION 185
Terraform works well in Windows but a Windows server is required.
- A. True
- B. False
Answer: B
NEW QUESTION 186
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 187
By default, provisioners that fail will also cause the Terraform apply itself to error. How can you change this default behavior within a provisioner?
- A. provisioner "local-exec" { on_failure = "continue" }
- B. provisioner "local-exec" { on_failure = "next" }
- C. provisioner "local-exec" { when = "failure" terraform apply }
- D. provisioner "local-exec" { on_failure = continue }
Answer: A
Explanation:
https://www.terraform.io/docs/provisioners/index.html
NEW QUESTION 188
What does the default "local" Terraform backend store?
- A. Terraform binary
- B. Provider plugins
- C. tfplan files
- D. State file
Answer: D
Explanation:
The local backend stores state on the local filesystem, locks that state using system APIs, and performs operations locally.
NEW QUESTION 189
You have declared a variable called var.list which is a list of objects that all have an attribute id.
Which options will produce a list of the IDs? (Choose two.)
- A. [ var.list[*].id ]
- B. { for o in var.list : o => o.id }
- C. [ for o in var.list : o.id ]
- D. var.list[*].id
Answer: B,D
NEW QUESTION 190
Which one of the following will run echo 0 and echo 1 on a newly created host?
- A. provisioner "remote-exec" {
command = "${echo 0}"
command = "${echo 1}"
} - B. provisioner "local-exec" { command = "echo 0"
command = "echo 1"
} - C. provisioner "remote-exec" {
inline = [
echo 0,
echo 1
]
} - D. provisioner "remote-exec" {
inline = [
"echo 0",
"echo 1"
]
}
Answer: D
Explanation:
remote-exec Provisioner
Example usage
resource "aws_instance" "web" {
# ...
provisioner "remote-exec" {
inline = [
"puppet apply",
"consul join ${aws_instance.web.private_ip}",
]
}
}
NEW QUESTION 191
Terraform validate reports syntax check errors from which of the following scenarios?
- A. Code contains tabs indentation instead of spaces
- B. None of the above
- C. The state files does not match the current infrastructure
- D. There is missing value for a variable
Answer: D
NEW QUESTION 192
Which of the following is an invalid variable name?
- A. var1
- B. count
- C. instance_name
- D. web
Answer: B
Explanation:
Explanation
https://www.terraform.io/intro/examples/count.html
NEW QUESTION 193
Environment variables can be used to set variables. The environment variables must be in the format
"____"_<variablename>. Select the correct prefix string from the following list.
- A. TF_CLI_ARGS
- B. TF_VAR_ENV
- C. TF_VAR
- D. TF_VAR_
Answer: D
Explanation:
Explanation
Environment variables can be used to set variables. The environment variables must be in the format TF_VAR_name and this will be checked last for a value. For example:
export TF_VAR_region=us-west-1
export TF_VAR_ami=ami-049d8641
export TF_VAR_alist='[1,2,3]'
export TF_VAR_amap='{ foo = "bar", baz = "qux" }'
https://www.terraform.io/docs/commands/environment-variables.html
NEW QUESTION 194
In the example below, the depends_on argument creates what type of dependency?
- A. internal dependency
- B. explicit dependency
- C. non-dependency resource
- D. implicit dependency
Answer: C
NEW QUESTION 195
When should you use the force-unlock command?
- A. You have a high priority change
- B. Automatic unlocking failed
- C. Your apply failed due to a state lock
- D. You see a status message that you cannot acquire the 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 196
Provider dependencies are created in several different ways. Select the valid provider dependencies from the following list: (select three)
- A. Use of any resource belonging to a particular provider in a resource or data block in configuration.
- B. Existence of any resource instance belonging to a particular provider in the current state.
- C. Explicit use of a provider block in configuration, optionally including a version constraint.
- D. Existence of any provider plugins found locally in the working directory.
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
Answer: A,B,C
NEW QUESTION 197
In Terraform 0.13 and above, outside of the required_providers block, Terraform configurations always refer to providers by their local names.
- A. True
- B. False
Answer: A
Explanation:
Outside of the required_providers block, Terraform configurations always refer to providers by their local names.
NEW QUESTION 198
What is the command you can use to set an environment variable named "var1"of type String?
- A. variable "var1" { type = "string"}
- B. export TF_VAR_var1
- C. set TF_VAR_var1
- D. export TF_VAR_VAR1
Answer: B
Explanation:
The environment variable must be in the format TF_VAR_name, so for the
https://www.terraform.io/docs/commands/environment-variables.html#tf_var_name
NEW QUESTION 199
Select the most accurate statement to describe the Terraform language from the following list.
- A. Terraform is an immutable, procedural, Infrastructure as Code configuration management language based on Hashicorp Configuration Language, or optionally JSON.
- B. Terraform is a mutable, declarative, Infrastructure as Code configuration management language based on Hashicorp Configuration Language, or optionally JSON.
- C. Terraform is a mutable, procedural, Infrastructure as Code provisioning language based on Hashicorp Configuration Language, or optionally YAML.
- D. Terraform is an immutable, declarative, Infrastructure as Code provisioning language based on Hashicorp Configuration Language, or optionally JSON.
Answer: D
Explanation:
Terraform is not a configuration management tool - https://www.terraform.io/intro/vs/chefpuppet.html Terraform is a declarative language - https://www.terraform.io/docs/configuration/index.html Terraform supports a syntax that is JSON compatible - https://www.terraform.io/docs/configuration/syntax-json.html Terraform is primarily designed on immutable infrastructure principles - https://www.hashicorp.com/resources/what-is-mutable-vs-immutable-infrastructure
NEW QUESTION 200
One remote backend configuration always maps to a single remote workspace.
- A. True
- B. False
Answer: A
Explanation:
Explanation/Reference: https://www.terraform.io/docs/language/settings/backends/remote.html
NEW QUESTION 201
......
Authentic Best resources for TA-002-P Online Practice Exam: https://www.pass4guide.com/TA-002-P-exam-guide-torrent.html
Updates Up to 365 days On Developing TA-002-P Braindumps: https://drive.google.com/open?id=1Mnlhtkkl3zZpFsHEMK6zpwB0TBD3h-_E