TA-002-P Exam Dumps
HashiCorp TA-002-P This Week Result
They can't be wrong
Score in Real Exam at Testing Centre
Questions came word by word from this dumps
Best HashiCorp TA-002-P Dumps - pass your exam In First Attempt
Our TA-002-P dumps are better than all other cheap TA-002-P study material.
Only best way to pass your HashiCorp TA-002-P is that if you will get reliable exam study materials. We ensure you that realexamdumps is one of the most authentic website for HashiCorp HashiCorp Infrastructure Automation Certification exam question answers. Pass your TA-002-P HashiCorp Certified: Terraform Associate with full confidence. You can get free HashiCorp Certified: Terraform Associate demo from realexamdumps. We ensure 100% your success in TA-002-P Exam with the help of HashiCorp Dumps. you will feel proud to become a part of realexamdumps family.
Our success rate from past 5 year very impressive. Our customers are able to build their carrier in IT field.


45000+ Exams

Desire Exam

Exam
Related Exam
Realexamdumps Providing most updated HashiCorp Infrastructure Automation Certification Question Answers. Here are a few exams:
Sample Questions
Realexamdumps Providing most updated HashiCorp Infrastructure Automation Certification Question Answers. Here are a few sample questions:
HashiCorp TA-002-P Sample Question 1
What does the command terraform fmt do?
Options:
Answer: A Explanation: Explanation: The terraform fmt command is used to rewrite Terraform configuration files to a canonical format and style. This command applies a subset of the Terraform language style conventions, along with other minor adjustments for readability.Other Terraform commands that generate Terraform configuration will produce configuration files that conform to the style imposed by terraform fmt, so using this style in your own files will ensure consistency.https://www.terraform.io/docs/commands/fmt.htmm
HashiCorp TA-002-P Sample Question 2
Select all features which are exclusive to Terraform Enterprise. (Select Three)
Options:
Answer: C, D, E Explanation: Explanation: Sentinel and Cost Estimation are also available in Terraform Cloudhttps://www.hashicorp.com/products/terraform/pricing/
HashiCorp TA-002-P Sample Question 3
Which one is the right way to import a local module names consul?
Options:
Answer: B, C Explanation: Explanation: A local path must begin with either ./ or ../ to indicate that a local path is intended, to distinguish from a module registry address.module "consul" {source = "./consul"}
HashiCorp TA-002-P Sample Question 4
Which of the below terraform commands do not run terraform refresh implicitly before taking actual action of the command?
Options:
Answer: C, D Explanation: Explanation: https://www.terraform.io/docs/commands/refresh.htmm
HashiCorp TA-002-P Sample Question 5
Which of the following clouds does not have a provider maintained HashiCorp?
Options:
Answer: A 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.htmm
HashiCorp TA-002-P Sample Question 6
Consider the following Terraform 0.12 configuration snippet: 1. variable "vpc_cidrs" { 2. type = map 3. default = { 4. us-east-1 = "10.0.0.0/16" 5. us-east-2 = "10.1.0.0/16" 6. us-west-1 = "10.2.0.0/16" 7. us-west-2 = "10.3.0.0/16" 8. } 9. } 10. 11. resource "aws_vpc" "shared" { 12. cidr_block = _____________ 13. } How would you define the cidr_block for us-east-1 in the aws_vpc resource using a variable?
Options:
Answer: D
HashiCorp TA-002-P Sample Question 7
Which of the below configuration file formats are supported by Terraform? (Select TWO)
Options:
Answer: B, E Explanation: Explanation: Terraform supports both HashiCorp Configuration Language (HCL) and JSON formats for configurations.https://www.terraform.io/docs/configuration/
HashiCorp TA-002-P Sample Question 8
What Terraform command can be used to inspect the current state file?
Options:
Answer: D
HashiCorp TA-002-P Sample Question 9
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.
Options:
Answer: B Explanation: Explanation: https://www.terraform.io/docs/commands/init.htmm
HashiCorp TA-002-P Sample Question 10
Terraform works well in Windows but a Windows server is required.
Options:
Answer: A Explanation: Explanation: You may see this QUESTION NO: in actual exam. Please remember : Terraform does not require GO language to be installed as a prerequisite and it does not require a Windows Server as well.
HashiCorp TA-002-P Sample Question 11
You have declared a variable name my_var in terraform configuration without a value associated with it. variable my_var {} After running terraform plan it will show an error as variable is not defined.
Options:
Answer: B Explanation: Explanation: Input variables are usually defined by stating a name, type and a default value. However, the type and default values are not strictly necessary. Terraform can deduct the type of the variable from the default or input value.Variables can be predetermined in a file or included in the command-line options. As such, the simplest variable is just a name while the type and value are selected based on the input.variable "variable_name" {}terraform apply -var variable_name="value"The input variables, like the one above, use a couple of different types: strings, lists, maps, and boolean. Here are some examples of how each type are defined and used.StringStrings mark a single value per structure and are commonly used to simplify and make complicated values more user-friendly. Below is an example of a string variable definition.variable "template" {type = stringdefault = "01000000-0000-4000-8000-000030080200"}A string variable can then be used in resource plans. Surrounded by double quotes, string variables are a simple substitution such as the example underneath.storage = var.templateListAnother type of Terraform variables lists. They work much like a numbered catalogue of values. Each value can be called by their corresponding index in the list. Here is an example of a list variable definition.variable "users" {type = listdefault = ["root", "user1", "user2"]}Lists can be used in the resource plans similarly to strings, but youâll also need to denote the index of the value you are looking for.username = var.users[0]MapMaps are a collection of string keys and string values. These can be useful for selecting values based on predefined parameters such as the server configuration by the monthly price.variable "plans" {type = mapdefault = {"5USD" = "1xCPU-1GB""10USD" = "1xCPU-2GB""20USD" = "2xCPU-4GB"}}You can access the right value by using the matching key. For example, the variable below would set the plan to "1xCPU-1GB".plan = var.plans["5USD"]The values matching to their keys can also be used to look up information in other maps. For example, underneath is a shortlist of plans and their corresponding storage sizes.variable "storage_sizes" {type = mapdefault = {"1xCPU-1GB" = "25""1xCPU-2GB" = "50""2xCPU-4GB" = "80"}}These can then be used to find the right storage size based on the monthly price as defined in the previous example.size = lookup(var.storage_sizes, var.plans["5USD"])BooleanThe last of the available variable type is boolean. They give the option to employ simple true or false values. For example, you might wish to have a variable that decides when to generate the root user password on a new deployment.variable "set_password" {default = false}The above example boolean can be used similarly to a string variable by simply marking down the correct variable.create_password = var.set_passwordBy default, the value is set to false in this example. However, you can overwrite the variable at deployment by assigning a different value in a command-line variable.terraform apply -var set_password="true"
HashiCorp TA-002-P Sample Question 12
Which of the following Terraform files should be ignored by Git when committing code to a repo? (select Three)
Options:
Answer: A, B, D Explanation: 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.
HashiCorp TA-002-P Sample Question 13
The Terraform language does not support user-defined functions, and so only the functions built in to the language are available for use.
Options:
Answer: B Explanation: Explanation: https://www.terraform.io/docs/configuration/functions.htmm
HashiCorp TA-002-P Sample Question 14
Which of the following represents a feature of Terraform Cloud that is NOT free to customers?
Options:
Answer: A Explanation: Explanation: Role Based Access Controls (RBAC) for controlling permissions for who has access to what configurations within an organization and it is not free to customers.https://www.hashicorp.com/products/terraform/pricing/
HashiCorp TA-002-P Sample Question 15
The current implementation of Terraform import can only import resources into the state. It does not generate configuration.
Options:
Answer: B Explanation: Explanation: The current implementation of Terraform import can only import resources into the state. It does not generate configuration. A future version of Terraform will also generate configuration.Because of this, prior to running terraform import it is necessary to write manually a resource configuration block for the resource, to which the imported object will be mapped.While this may seem tedious, it still gives Terraform users an avenue for importing existing resources.https://www.terraform.io/docs/import/index.html#currently-state-onlz
HashiCorp TA-002-P Sample Question 16
What features stops multiple admins from changing the Terraform state at the same time?
Options:
Answer: E
HashiCorp TA-002-P Sample Question 17
Which of the following is not a valid string function in Terraform?
Options:
Answer: C Explanation: Reference: [Reference: https://www.terraform.io/docs/language/functions/chomp.html, ]
HashiCorp TA-002-P Sample Question 18
Which of the following best describes a Terraform provider?
Options:
Answer: A Explanation: Explanation: A provider is responsible for understanding API interactions and exposing resources. Providers generally are an IaaS (e.g. Alibaba Cloud, AWS, GCP, Microsoft Azure, OpenStack), PaaS (e.g. Heroku), or SaaS services (e.g. Terraform Cloud, DNSimple, Cloudflare).https://www.terraform.io/docs/providers/index.htmm
HashiCorp TA-002-P Sample Question 19
What is the purpose of using the local-exec provisioner? (Select Two)
Options:
Answer: A, C Explanation: Explanation: The local-exec provisioner invokes a local executable after a resource is created. This invokes a process on the machine running Terraform, not on the resource.Note that even though the resource will be fully created when the provisioner is run, there is no guarantee that it will be in an operable state - for example system services such as sshd may not be started yet on compute resources.Example usageresource "aws_instance" "web" {# ...provisioner "local-exec" {command = "echo ${aws_instance.web.private_ip} >> private_ips.txt"}}Note: Provisioners should only be used as a last resort. For most common situations there are better alternatives.https://www.terraform.io/docs/provisioners/local-exec.htmm
HashiCorp TA-002-P Sample Question 20
Terraform providers are always installed from the Internet.
Options:
Answer: B Explanation: Explanation: Terraform configurations must declare which providers they require, so that Terraform can install and use them.Reference: [Reference: https://www.terraform.io/docs/language/providers/configuration.html, ]
HashiCorp TA-002-P Sample Question 21
Terraform can import modules from a number of sources â which of the following is not a valid source?
Options:
Answer: B
HashiCorp TA-002-P Sample Question 22
Which task does terraform init not perform?
Options:
Answer: D Explanation: Reference: [Reference: https://www.terraform.io/docs/cli/commands/init.html, ]
HashiCorp TA-002-P Sample Question 23
Which provisioner invokes a process on the resource created by Terraform?
Options:
Answer: A Explanation: 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.htmm
HashiCorp TA-002-P Sample Question 24
Which backend does the Terraform CLI use by default?
Options:
Answer: E
HashiCorp TA-002-P Sample Question 25
Terraform validate reports syntax check errors from which of the following scenarios?
Options:
Answer: C
HashiCorp TA-002-P Sample Question 26
What does the default "local" Terraform backend store?
Options:
Answer: D Explanation: Explanation: The local backend stores state on the local filesystem, locks that state using system APIs, and performs operations locally.Reference: [Reference: https://www.terraform.io/docs/language/settings/backends/local.html, ]
HashiCorp TA-002-P Sample Question 27
Taint the resource "aws_instance" "baz" resource that lives in module bar which lives in module foo.
Options:
Answer: C Explanation: Explanation: Check resource addressinghttps://www.terraform.io/docs/internals/resource-addressing.htmm
HashiCorp TA-002-P Sample Question 28
You cannot publish your own modules on the Terraform Registry.
Options:
Answer: A Explanation: Explanation: https://www.terraform.io/docs/registry/modules/publish.htmm
HashiCorp TA-002-P Sample Question 29
Dawn has created the below child module. Without changing the module, can she override the instance_type from t2.micro to t2.large form her code while calling this module? 1. resource "aws_instance" "myec2" 2. { 3. ami = "ami-082b5a644766e0e6f" 4. instance_type = "t2.micro 5. }
Options:
Answer: B Explanation: Explanation: As the instance_type is hard-coded in source module, you will not be able to change its value from destination module. Instead of hard-coding you should use variable with default values.
HashiCorp TA-002-P Sample Question 30
The Terraform CLI will print output values from a child module after running terraform apply.
Options:
Answer: B
HashiCorp TA-002-P Sample Question 31
Terraform and Terraform providers must use the same major version number in a single configuration.
Options:
Answer: C
HashiCorp TA-002-P Sample Question 32
When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)
Options:
Answer: C
HashiCorp TA-002-P Sample Question 33
When should you use the force-unlock command?
Options:
Answer: C Explanation: Explanation: Manually unlock the state for the defined configuration.Reference: [Reference: https://www.terraform.io/docs/cli/commands/force-unlock.html, ]
HashiCorp TA-002-P Sample Question 34
You just scaled your VM infrastructure and realized you set the count variable to the wrong value. You correct the value and save your change. What do you do next to make your infrastructure match your configuration?
Options:
Answer: B
HashiCorp TA-002-P Sample Question 35
Which of the below command will upgrade the provider version to the latest acceptable one?
Options:
Answer: C Explanation: Explanation: To upgrade to the latest acceptable version of each provider, run terraform init -upgrade. This command also upgrades to the latest versions of all Terraform modules.https://www.terraform.io/docs/configuration/providers.htmm
HashiCorp TA-002-P Sample Question 36
When using Terraform in a team it is important for everyone to be working with the same state so that operations will be applied to the same remote objects. Which of the below option is a recommended solution for this?
Options:
Answer: A Explanation: Explanation: https://www.terraform.io/docs/state/remote.htmm
HashiCorp TA-002-P Sample Question 37
The terraform state command can be used to ____
Options:
Answer: A Explanation: Explanation: The terraform state command is used for advanced state management. Rather than modify the state directly, the terraform state commands can be used in many cases instead.https://www.terraform.io/docs/commands/state/index.htmm
HashiCorp TA-002-P Sample Question 38
Which of the following value will be accepted for var1? variable "var1" { type = string }
Options:
Answer: B Explanation: Explanation: Terraform automatically converts number and bool values to strings when needed.
HashiCorp TA-002-P Sample Question 39
You have been given requirements to create a security group for a new application. Since your organization standardizes on Terraform, you want to add this new security group with the fewest number of lines of code. What feature could you use to iterate over a list of required tcp ports to add to the new security group?
Options:
Answer: D Explanation: Explanation: A dynamic block acts much like a for expression, but produces nested blocks instead of a complex typed value. It iterates over a given complex value and generates a nested block for each element of that complex value.https://www.terraform.io/docs/configuration/expressions.html#dynamic-blockt
HashiCorp TA-002-P Sample Question 40
Terraform Cloud always encrypts state at rest and protects it with TLS in transit. Terraform Cloud also knows the identity of the user requesting state and maintains a history of state changes.
Options:
Answer: B Explanation: Explanation: Terraform Cloud always encrypts state at rest and protects it with TLS in transit. Terraform Cloud also knows the identity of the user requesting state and maintains a history of state changes. This can be used to control access and track activity. Terraform Enterprise also supports detailed audit logging.https://www.terraform.io/docs/state/sensitive-data.html#recommendationt
HashiCorp TA-002-P Sample Question 41
Multiple providers can be declared within a single Terraform configuration file.
Options:
Answer: A 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 configurationprovider "aws" {region = "us-east-1"}# Additional provider configuration for west coast regionprovider "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.htmm
HashiCorp TA-002-P Sample Question 42
Command terraform refresh will update state file?
Options:
Answer: B Explanation: Explanation: The terraform refresh command is used to reconcile the state Terraform knows about (via its state file) with the real-world infrastructure. This can be used to detect any drift from the last-known state, and to update the state file.This does not modify infrastructure, but does modify the state file. If the state is changed, this may cause changes to occur during the next plan or apply.https://www.terraform.io/docs/commands/refresh.htmm
HashiCorp TA-002-P Sample Question 43
Which of the below options is a valid interpolation syntax for retrieving a data source?
Options:
Answer: D Explanation: Explanation: Data source attributes are interpolated with the general syntax data.TYPE.NAME.ATTRIBUTE. The interpolation for a resource is the same but without the data. prefix (TYPE.NAME.ATTRIBUTE).https://www.terraform.io/docs/configuration-0-11/interpolation.html#attributes-of-a-data-sourcf
HashiCorp TA-002-P Sample Question 44
Which of the below datatype is not supported by Terraform.
Options:
Answer: B
HashiCorp TA-002-P Sample Question 45
Which of the below features of Terraform can be used for managing small differences between different environments which can act more like completely separate working directories.
Options:
Answer: B Explanation: Explanation: workspaces allow conveniently switching between multiple instances of a single configuration within its single backend. They are convenient in a number of situations, but cannot solve all problems.A common use for multiple workspaces is to create a parallel, distinct copy of a set of infrastructure in order to test a set of changes before modifying the main production infrastructure. For example, a developer working on a complex set of infrastructure changes might create a new temporary workspace in order to freely experiment with changes without affecting the default workspace.Non-default workspaces are often related to feature branches in version control. The default workspace might correspond to the "master" or "trunk" branch, which describes the intended state of production infrastructure. When a feature branch is created to develop a change, the developer of that feature might create a corresponding workspace and deploy into it a temporary "copy" of the main infrastructure so that changes can be tested without affecting the production infrastructure. Once the change is merged and deployed to the default workspace, the test infrastructure can be destroyed and the temporary workspace deleted.https://www.terraform.io/docs/state/workspaces.html https://www.terraform.io/docs/state/workspaces.html#when-to-use-multiple-workspacet
HashiCorp TA-002-P Sample Question 46
True or False: Workspaces provide identical functionality in the open-source, Terraform Cloud, and Enterprise versions of Terraform.
Options:
Answer: B Explanation: Explanation: Explanationhttps://www.terraform.io/docs/cloud/workspaces/index.html https://www.terraform.io/docs/state/workspaces.htmm