TA-002-P Training & Certification Get Latest HashiCorp Infrastructure Automation Updated on Oct 10, 2021 [Q38-Q56]

Share

TA-002-P Training & Certification Get Latest HashiCorp Infrastructure Automation Updated on Oct 10, 2021

Certification Training for TA-002-P Exam Dumps Test Engine

NEW QUESTION 38
Which of the following is allowed as a Terraform variable name?

  • A. source
  • B. name
  • C. version
  • D. count

Answer: B

 

NEW QUESTION 39
How can you ensure that the engineering team who has access to git repo will not create any non-compliant resources that might lead to a security audit failure in future. your team is using Hashicorp Terraform Enterprise Edition.

  • A. Implement a review process where every code will be reviewed before merging to the master branch.
  • B. Create a design /security document (in PDF) and share to the team , and ask them to always follow that document , and never deviate from it.
  • C. Use Terraform OSS Sentinel Lite version , which will save cost , since there is no charge for OSS , but it can still check for most non-compliant rules using Policy-As-Code.
  • D. Since your team is using Hashicorp Terraform Enterprise Edition , enable Sentinel , and write Policy-As-Code rules that will check for non-compliant resource provisioning , and prevent/report them.

Answer: D

Explanation:
Explanation
https://www.terraform.io/docs/cloud/sentinel/index.html

 

NEW QUESTION 40
Your team uses terraform OSS . You have created a number of resuable modules for important , independent network components that you want to share with your team to enhance consistency . What is the correct option/way to do that?

  • A. Upload your modules with proper versioning in the terraform public module registry . Terraform OSS is directly integrated with the public module registry , and can reference the modules from the code in the main tf file.
  • B. Terraform module sharing is only available in Enterprise version via terraform private module registry , so no way to enable it in OSS version.
  • C. Terraform modules cannot be shared in OSS version . Each developer needs to maintain their own modules and leverage them in the main tf file.
  • D. Store your modules in a NAS/ shared file server , and ask your team members to directly reference the code from there. This is the only viable option in terraform OSS ,which is better than individually maintaining module versions for every developer.

Answer: A

Explanation:
Explanation
Software development encourages code reuse through reusable artifacts, such as libraries, packages and modules. Most programming languages enable developers to package and publish these reusable components and make them available on a registry or feed. For example, Python has Python Package Index and PowerShell has PowerShell Gallery.
For Terraform users, the Terraform Registry enables the distribution of Terraform modules, which are reusable configurations. The Terraform Registry acts as a centralized repository for module sharing, making modules easier to discover and reuse.
The Registry is available in two variants:
* Public Registry houses official Terraform providers -- which are services that interact with an API to expose and manage a specific resource -- and community-contributed modules.
* Private Registry is available as part of the Terraform Cloud, and can host modules internally within an organization.
https://www.terraform.io/docs/registry/index.html

 

NEW QUESTION 41
Given the below resource configuration -
resource "aws_instance" "web" { # ... count = 4 }
What does the terraform resource address aws_instance.web refer to?

  • A. It refers to all 4 web instances , together , for further individual segregation , indexing is required , with a 0 based index.
  • B. It refers to the last web EC2 instance , as by default , if no index is provided , the last / N-1 index is used.
  • C. It refers to the first web EC2 instance out of the 4 ,as by default , if no index is provided , the first / 0th index is used.
  • D. The above will result in a syntax error , as it is not syntactically correct . Resources defined using count , can only be referenced using indexes.

Answer: A

Explanation:
Explanation
A Resource Address is a string that references a specific resource in a larger infrastructure. An address is made up of two parts:
[module path][resource spec]
Module path:
A module path addresses a module within the tree of modules. It takes the form:
module.A.module.B.module.C...
Multiple modules in a path indicate nesting. If a module path is specified without a resource spec, the address applies to every resource within the module. If the module path is omitted, this addresses the root module.
Given a Terraform config that includes:
resource "aws_instance" "web" {
# ...
count = 4
}
An address like this:
aws_instance.web[3]
Refers to only the last instance in the config, and an address like this:
aws_instance.web
Refers to all four "web" instances.
https://www.terraform.io/docs/internals/resource-addressing.html

 

NEW QUESTION 42
What resource dependency information is stored in Terraform's state?

  • A. Both implicit and explicit dependencies are stored in state.
  • B. No dependency information is stored in state.
  • C. Only explicit dependencies are stored in state.
  • D. Only implicit dependencies are stored in state.

Answer: A

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 43
Which one of the following command will rewrite Terraform configuration files to a canonical format and style.

  • A. terraform graph
  • B. terraform graph -h
  • C. terraform init
  • D. terraform fmt

Answer: D

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 Terrra Terraform language style conventions, along with other minor adjustments for readability.

 

NEW QUESTION 44
State locking does not happen automatically and must be specified at run

  • A. False
  • B. True

Answer: A

Explanation:
State locking happens automatically on all operations that could write state.
https://www.terraform.io/docs/state/locking.html

 

NEW QUESTION 45
Select all Operating Systems that Terraform is available for. (select five)

  • A. Solaris
  • B. Unix
  • C. Windows
  • D. FreeBSD
    Explanation
    Terraform is available for macOS, FreeBSD, OpenBSD, Linux, Solaris, Windows https://www.terraform.io/downloads.html
  • E. Linux
  • F. macOS

Answer: A,C,D,E,F

 

NEW QUESTION 46
Terraform works well in Windows but a Windows server is required.

  • A. False
  • B. True

Answer: A

 

NEW QUESTION 47
Please identify the offerings which are unique to Terraform Enterprise, and not available in either Terraform OSS, or Terraform Cloud. Select four.

  • A. Audit Logs
  • B. Clustering
  • C. Private Network Connectivity
  • D. Sentinel
  • E. VCS Integration

Answer: A,B,C

Explanation:
https://www.hashicorp.com/products/terraform/pricing/

 

NEW QUESTION 48
Command terraform refresh will update state file?

  • A. True
  • B. False

Answer: A

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.html

 

NEW QUESTION 49
Which statements best describes what the local variable assignment is doing in the following code snippet:

  • A. Create a map of route table names from a list of subnet names
  • B. Create a map of route table names to subnet names
  • C. Create a distinct list of route table name objects
  • D. Create a list of route table names eliminating duplicates

Answer: D

 

NEW QUESTION 50
Which of the following is the correct way to pass the value in the variable num_servers into a module with the input servers?

  • A. servers = variable.num_servers
  • B. servers = var.num_servers
  • C. servers = var(num_servers)
  • D. servers = num_servers

Answer: D

 

NEW QUESTION 51
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. Unlock
  • C. force-unlock
  • D. state-unlock
    Explanation
    https://www.terraform.io/docs/commands/force-unlock.html

Answer: A

 

NEW QUESTION 52
What does the default "local" Terraform backend store?

  • A. tfplan files
  • B. Terraform binary
  • C. Provider plugins
  • D. State file

Answer: D

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 53
Your team has started using terraform OSS in a big way , and now wants to deploy multi region deployments (DR) in aws using the same terraform files . You want to deploy the same infra (VPC,EC2 ...) in both us-east-1 ,and us-west-2 using the same script , and then peer the VPCs across both the regions to enable DR traffic. But , when you run your script , all resources are getting created in only the default provider region. What should you do? Your provider setting is as below -
# The default provider configuration provider "aws" { region = "us-east-1" }

  • A. Create a list of regions , and then use a for-each to iterate over the regions , and create the same resources ,one after the one , over the loop.
  • B. No way to enable this via a single script . Write 2 different scripts with different default providers in the 2 scripts , one for us-east , another for us-west.
  • C. Use provider alias functionality , and add another provider for us-west region . While creating the resources using the tf script , reference the appropriate provider (using the alias).
  • D. Manually create the DR region , once the Primary has been created , since you are using terraform OSS , and multi region deployment is only available in Terraform Enterprise.

Answer: C

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"
}
https://www.terraform.io/docs/configuration/providers.html

 

NEW QUESTION 54
What resource dependency information is stored in Terraform's state?

  • A. Both implicit and explicit dependencies are stored in state.
  • B. No dependency information is stored in state.
  • C. Only explicit dependencies are stored in state.
  • D. Only implicit dependencies are stored in state.

Answer: A

Explanation:
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 55
When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)

  • A. When a change is made to the resources via the Azure Cloud Console, the changes are recorded in a new state file
  • B. When a change is made to the resources via the Azure Cloud Console, the current state file will not be updated
  • C. When a change is made to the resources via the Azure Cloud Console, the changes are recorded in the current state file
  • D. When a change is made to the resources via the Azure Cloud Console, Terraform will update the state file to reflect them during the next plan or apply

Answer: D

 

NEW QUESTION 56
......

Step by Step Guide to Prepare for TA-002-P Exam: https://www.real4dumps.com/TA-002-P_examcollection.html

HashiCorp Infrastructure Automation TA-002-P Real Exam Questions and Answers FREE Updated: https://drive.google.com/open?id=1Ez6saefYCh7FbgiDFJTfALZH1mmz6Big