HashiCorp TA-002-P Certification All-in-One Exam Guide Nov-2022
Get Real TA-002-P Exam Dumps [Nov-2022] Practice Tests
Aruba Networks Certified: Mobility Associate-Professional Exam Certified Professional salary
The estimated average salary of HashiCorp Certified: Terraform Associate TA-002-P Professional Exam is listed below:
- India: 7,199,4 INR
- England: 71,460 POUND
- Europe: 88,032 EURO
- United States: 100,146 USD
These salaries are calculated at the time of writing according to the currency rates.
NEW QUESTION 46
Using the terraform state rm command against a resource will destroy it.
- A. True
- B. False
Answer: B
NEW QUESTION 47
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. Named values
- B. Backends
- C. Data sources
- D. Functions
Answer: D
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 48
Open source Terraform can only import publicly-accessible and open-source modules.
- A. True
- B. False
Answer: B
NEW QUESTION 49
Which of the following variable definition files will terraform load automatically?
- A. terraform.tfvars.json
- B. Any files with names ending in .auto.tfvars.json
- C. terraform.tfvar
- D. terraform.tfvars
Answer: A,B,D
Explanation:
Explanation
Terraform also automatically loads a number of variable definitions files if they are present:
Files named exactly terraform.tfvars or terraform.tfvars.json.
Any files with names ending in .auto.tfvars or .auto.tfvars.json.
https://www.terraform.io/docs/configuration/variables.html
https://www.terraform.io/docs/configuration/variables.html#variable-definitions-tfvars-files
NEW QUESTION 50
In order to make a Terraform configuration file dynamic and/or reusable, static values should be converted to use what?
- A. Module
- B. Output Value
- C. Regular Expressions
- D. Input Parameters
Answer: D
Explanation:
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 51
Which of the following commands will launch the Interactive console for Terraform interpolations?
- A. terraform
- B. terraform console
- C. terraform cli
- D. terraform cmdline
Answer: C
Explanation:
https://www.terraform.io/docs/commands/console.html
NEW QUESTION 52
Terra form installs its providers during which phase?
- A. All of the above
- B. Refresh
- C. Init
- D. Man
Answer: C
NEW QUESTION 53
Complete the following sentence:
The terraform state command can be used to ____
- A. There is no such command
- B. refresh state
- C. modify state
- D. view state
Answer: C
Explanation:
https://www.terraform.io/docs/commands/state/index.html
NEW QUESTION 54
resource "aws_s3_bucket" "example" { bucket = "my-test-s3-terraform-bucket" ...} resource "aws_iam_role" "test_role" { name = "test_role" ...} 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. 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.
- 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. 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.
Answer: B
Explanation:
Use the depends_on meta-argument to handle hidden resource dependencies that Terraform can't automatically infer.
Explicitly specifying a dependency is only necessary when a resource relies on some other resource's behavior but doesn't access any of that resource's data in its arguments.
NEW QUESTION 55
True or False? Each Terraform workspace uses its own state file to manage the infrastructure associated with that particular workspace.
- A. True
- B. False
Answer: A
Explanation:
Explanation
The persistent data stored in the backend belongs to a workspace. Initially, the backend has only one workspace, called "default", and thus there is only one Terraform state associated with that configuration.
NEW QUESTION 56
does not require GO language to be installed as a prerequisite and it does not require a Windows Server as well.
- A. True
- B. False
Answer: B
NEW QUESTION 57
Terraform provisioners can be added to any resource block.
- A. True
- B. False
Answer: A
NEW QUESTION 58
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. Functions
- B. Variables
- C. Local Values
- D. Expressions
Answer: C
Explanation:
https://www.terraform.io/docs/configuration/locals.html
NEW QUESTION 59
Which Terraform command will check and report errors within modules, attribute names, and value types to make sure they are syntactically valid and internally consistent?
- A. terraform fmt
- B. terraform show
- C. terraform validate
- D. terraform format
Answer: C
Explanation:
The terraform validate command validates the configuration files in a directory, referring only to the configuration and not accessing any remote services such as remote state, provider APIs, etc.
Validate runs checks that verify whether a configuration is syntactically valid and internally consistent, regardless of any provided variables or existing state. It is thus primarily useful for general verification of reusable modules, including the correctness of attribute names and value types.
It is safe to run this command automatically, for example as a post-save check in a text editor or as a test step for a re-usable module in a CI system.
NEW QUESTION 60
Running terraform fmt without any flags in a directory with Terraform configuration files will check the formatting of those files without changing their contents.
- A. True
- B. False
Answer: B
NEW QUESTION 61
True or False: A list(...) contain a number of values of the same type while an object(...) can contain a number of values of different types.
- A. True
- B. False
Answer: A
Explanation:
Explanation
Collection Types
A collection type allows multiple values of one other type to be grouped together as a single value. The type of value within a collection is called its element type. All collection types must have an element type, which is provided as the argument to their constructor.
For example, the type list(string) means "list of strings", which is a different type than list(number), a list of numbers. All elements of a collection must always be of the same type.
The three kinds of collection type in the Terraform language are:
* list(...): a sequence of values identified by consecutive whole numbers starting with zero.
The keyword list is a shorthand for list(any), which accepts any element type as long as every element is the same type. This is for compatibility with older configurations; for new code, we recommend using the full form.
* map(...): a collection of values where each is identified by a string label.
The keyword map is a shorthand for map(any), which accepts any element type as long as every element is the same type. This is for compatibility with older configurations; for new code, we recommend using the full form.
* set(...): a collection of unique values that do not have any secondary identifiers or ordering.
https://www.terraform.io/docs/configuration/types.html
Structural Types
A structural type allows multiple values of several distinct types to be grouped together as a single value.
Structural types require a schema as an argument, to specify which types are allowed for which elements.
The two kinds of structural type in the Terraform language are:
* object(...): a collection of named attributes that each have their own type.
The schema for object types is { <KEY> = <TYPE>, <KEY> = <TYPE>, ... } - a pair of curly braces containing a comma-separated series of <KEY> = <TYPE> pairs. Values that match the object type must contain all of the specified keys, and the value for each key must match its specified type. (Values with additional keys can still match an object type, but the extra attributes are discarded during type conversion.)
* tuple(...): a sequence of elements identified by consecutive whole numbers starting with zero, where each element has its own type.
The schema for tuple types is [<TYPE>, <TYPE>, ...] - a pair of square brackets containing a comma-separated series of types. Values that match the tuple type must have exactly the same number of elements (no more and no fewer), and the value in each position must match the specified type for that position.
For example: an object type of object({ name=string, age=number }) would match a value like the following:
{
name = "John"
age = 52
}
Also, an object type of object({ id=string, cidr_block=string }) would match the object produced by a reference to an aws_vpc resource, like aws_vpc.example_vpc; although the resource has additional attributes, they would be discarded during type conversion.
Finally, a tuple type of tuple([string, number, bool]) would match a value like the following:
["a", 15, true]
https://www.terraform.io/docs/configuration/types.html
NEW QUESTION 62
A provider configuration block is required in every Terraform configuration.
Example:
- A. True
- B. False
Answer: A
Explanation:
Reference: https://github.com/hashicorp/terraform/issues/17928
NEW QUESTION 63
Which provisioner invokes a process on the resource created by Terraform?
- A. file
- B. remote-exec
- C. local-exec
- D. null-exec
Answer: B
Explanation:
The remote-exec provisioner invokes a script on a remote resource after it is created. Reference: https://www.terraform.io/docs/language/resources/provisioners/remote-exec.html
NEW QUESTION 64
Refer to the below code where developer is outputting the value of the database password but has used sensitive parameter to hide the output value in the CLI.
output "db_password" { value = aws_db_instance.db.password description = "The password for logging in to the database." sensitive = true} Since sensitive is set to true, the value associated with db password will not be present in state file as plain-text?
- A. True
- B. False
Answer: B
Explanation:
Explanation
Sensitive output values are still recorded in the state, and so will be visible to anyone who is able to access the state data.
NEW QUESTION 65
Which of the following is not a valid string function in Terraform?
- A. chomp
- B. slice
- C. join
- D. split
Answer: A
Explanation:
Reference: https://www.terraform.io/docs/language/functions/chomp.html
NEW QUESTION 66
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. Bitbucket Cloud
- B. Azure DevOps Server
- C. CVS Version Control
- D. GitHub
- E. GitHub Enterprise
Answer: A,B,D,E
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 67
If a module uses a local variable, you can expose that value with a terraform output.
- A. True
- B. False
Answer: A
Explanation:
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 68
......
Last TA-002-P practice test reviews: Practice Test HashiCorp dumps: https://passguide.dumpexams.com/TA-002-P-vce-torrent.html