[Nov 26, 2024] Get Free Updates Up to 365 days On Developing TA-002-P Braindumps
Best Quality HashiCorp TA-002-P Exam Questions
Understanding functional and technical aspects of HashiCorp Certified: Terraform Associate TA-002-P Professional Exam Object Management
The following will be discussed in HASHICORP TA-002 exam dumps:
- Exhibit use of variables and outputs
- Use Terraform built-in functions to write configuration
- Express secure secret injection best practice
- Utilize resource addressing and resource parameters to connect resources
- Learn the application of the collection and structural types
- Specify built-in dependency management
- Configure resource using a dynamic block
- Design and distinguish resource and data configuration
Achieving the HashiCorp Certified: Terraform Associate certification is a valuable credential for professionals who work with cloud infrastructure and automation. HashiCorp Certified: Terraform Associate certification demonstrates a candidate's ability to design, deploy, and manage infrastructure as code using Terraform. It also indicates a candidate's commitment to professional development and staying up-to-date with the latest trends and technologies in cloud infrastructure management.
NEW QUESTION # 26
Select the answer below that completes the following statement: Terraform Cloud can be managed from the
CLI but requires __________?
- A. a username and password
- B. a TOTP token
- C. an API token
- D. authentication using MFA
Answer: C
Explanation:
Explanation
API and CLI access are managed with API tokens, which can be generated in the Terraform Cloud UI. Each
user can generate any number of personal API tokens, which allow access with their own identity and
permissions. Organizations and teams can also generate tokens for automating tasks that aren't tied to an
individual user.
NEW QUESTION # 27
Your security team scanned some Terraform workspaces and found secrets stored in a plaintext in state files.
How can you protect sensitive data stored in Terraform state files?
- A. Store the state in an encrypted backend
- B. Always store your secrets in a secrets.tfvars file.
- C. Delete the state file every time you run Terraform
- D. Edit your state file to scrub out the sensitive data
Answer: A
NEW QUESTION # 28
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_VAR_ENV
- B. TF_CLI_ARGS
- C. TF_VAR
- D. TF_VAR_
Answer: D
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 # 29
Matt wants to import a manually created EC2 instance into terraform so that he can manage the EC2 instance through terraform going forward. He has written the configuration file of the EC2 instance before importing it to Terraform. Following is the code:
resource "aws_instance" "matt_ec2" { ami = "ami-bg2640de" instance_type = "t2.micro" vpc_security_group_ids = ["sg-6ae7d613", "sg-53370035"] key_name = "mysecret" subnet_id =
"subnet-9e3cfbc5" }
The instance id of that EC2 instance is i-0260835eb7e9bd40 How he can import data of EC2 to state file?
- A. terraform import aws_instance.i-0260835eb7e9bd40
- B. terraform import i-0260835eb7e9bd40
- C. terraform import aws_instance.matt_ec2 i-0260835eb7e9bd40
- D. terraform import aws_instance.id = i-0260835eb7e9bd40
Answer: C
Explanation:
Explanation
https://www.terraform.io/docs/import/usage.html
NEW QUESTION # 30
How do you specify a module's version when publishing it to the public Terraform Module Registry?
- A. The module's Terraform code
- B. The module's configuration page on the Terraform Module Registry
- C. The release tags in the associated repo Most Voted
- D. Terraform Module Registry does not support versioning modules
Answer: C
Explanation:
Explanation
https://www.terraform.io/registry/modules/publish
NEW QUESTION # 31
What is one disadvantage of using dynamic blocks in Terraform?
- A. They cannot be used to loop through a list of values
- B. Dynamic blocks can construct repeatable nested blocks
- C. Terraform will run more slowly
- D. They make configuration harder to read and understand
Answer: A
Explanation:
Explanation/Reference: https://github.com/hashicorp/terraform/issues/19291
NEW QUESTION # 32
What does the default "local" Terraform backend store?
- A. Provider plugins
- B. State file
- C. Terraform binary
- D. tfplan files
Answer: B
Explanation:
Explanation
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 # 33
Where can Terraform not load a provider from?
- A. Official HashCrop Distribution on releases.hashcrop.com
- B. Provider plugin chance
- C. Plugins directory
- D. Source code
Answer: D
Explanation:
This is where Terraform cannot load a provider from, as it requires a compiled binary file that implements the provider protocol. You can load a provider from a plugins directory, a provider plugin cache, or the official HashiCorp distribution on releases.hashicorp.com.
NEW QUESTION # 34
Select the answer below that completes the following statement: Terraform Cloud can be managed from the CLI but requires __________?
- A. a username and password
- B. a TOTP token
- C. an API token
- D. authentication using MFA
Answer: C
Explanation:
Explanation
API and CLI access are managed with API tokens, which can be generated in the Terraform Cloud UI. Each user can generate any number of personal API tokens, which allow access with their own identity and permissions. Organizations and teams can also generate tokens for automating tasks that aren't tied to an individual user.
NEW QUESTION # 35
Select the answer below that completes the following statement: Terraform Cloud can be managed from the CLI but requires __________?
- A. a username and password
- B. a TOTP token
- C. an API token
- D. authentication using MFA
Answer: C
Explanation:
API and CLI access are managed with API tokens, which can be generated in the Terraform Cloud UI. Each user can generate any number of personal API tokens, which allow access with their own identity and permissions. Organizations and teams can also generate tokens for automating tasks that aren't tied to an individual user.
NEW QUESTION # 36
You have configured an Auto Scaling group in AWS to automatically scale the number of instances behind a
load balancer based on the instances CPU utilization. The instances are configured using a Launch
Configuration. You have observed that the Auto Scaling group doesn't successfully scale when you apply
changes that require replacing the Launch Configuration. Why is this happening?
- A. You need to configure the Auto Scaling group's create_before_destroy meta-parameter.
- B. You need to configure an explicit dependency for the Auto Scaling group using the depends_on
meta-parameter. - C. You need to configure an explicit dependency for the Launch Configuration using the depends_on
meta-parameter. - D. You need to configure the Launch Configuration's create_before_destroy meta-parameter.
Answer: D
Explanation:
Explanation
https://www.terraform.io/docs/providers/aws/r/launch_configuration.html#using-withautoscaling-groups
NEW QUESTION # 37
Which argument(s) is (are) required when declaring a Terraform variable?
- A. All of the above
- B. default
- C. None of the above
- D. type
- E. description
Answer: B
Explanation:
The variable declaration can also include a default argument.
NEW QUESTION # 38
The terraform init command is always safe to run multiple times, to bring the working directory up to date with changes in the configuration. Though subsequent runs may give errors, this command will never delete your existing configuration or state.
- A. False
- B. True
Answer: B
Explanation:
https://www.terraform.io/docs/commands/init.html
NEW QUESTION # 39
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. Add a breakpoint in your code, using the watch keyword , and output the value to console for temporary
debugging. - B. 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. - C. 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. - D. Use terraform zipmap function , it will be able to easily do the interpolations without complex code.
Answer: C
Explanation:
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 # 40
Which of the following Terraform files should be ignored by Git when committing code to a repo? (select Three)
- A. terraform.tfstate
- B. input.tf
- C. Any files with names ending in .auto.tfvars or .auto.tfvars.json.
- D. Files named exactly terraform.tfvars or terraform.tfvars.json.
- E. output.tf
Answer: A,C,D
Explanation:
The .gitignore file should be configured to ignore Terraform files that either contain sensitive data or are not required to save.
Terraform state (terraform.tfstate) can contain sensitive data, depending on the resources in use and your definition of "sensitive." The state contains resource IDs and all resource attributes. For resources such as databases, this may contain initial passwords.
When using local state, state is stored in plain-text JSON files.
The terraform.tfvars file may contain sensitive data, such as passwords or IP addresses of an environment that you may not want to share with others.
NEW QUESTION # 41
When using multiple configurations of the same Terraform provider, what meta-argument must be included in any non-default provider configurations?
- A. alias
- B. name
- C. depends_on
- D. id
Answer: A
NEW QUESTION # 42
Which of the following actions are performed during a terraform init?
- A. Provisions the declared resources in your configuration
- B. Initializes downloaded and/or installed providers
- C. Initializes the backend configuration
- D. Download the declared providers which are supported by HashiCorp
Answer: B,C,D
Explanation:
The terraform init command is used to initialize a working directory containing Terraform configuration files. This is the first command that should be run after writing a new Terraform configuration or cloning an existing one from version control. It is safe to run this command multiple times.
This command is always safe to run multiple times, to bring the working directory up to date with changes in the configuration. Though subsequent runs may give errors, this command will never delete your existing configuration or state.
terraform init command does -
* Copy a Source Module
* Backend Initialization
* Child Module Installation
* Plugin Installation
https://www.terraform.io/docs/commands/init.html
NEW QUESTION # 43
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. False
- B. True
Answer: B
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 # 44
What does this code do?
- A. Requires any version of the AWS provider after the 3.0 major release like 4.1
- B. Requires any version of the AWS provider > = 3.0
- C. Requires any version of the AWS provider > 3.0
- D. Requires any version of the AWS provider > = 3.0 and < 4.0
Answer: D
NEW QUESTION # 45
......
HashiCorp Exam Practice Test To Gain Brilliante Result: https://www.easy4engine.com/TA-002-P-test-engine.html
Tested Material Used To TA-002-P: https://drive.google.com/open?id=1UGGFJCAcPXGuwtY8h-NC9XIzbCScVH1j

