Pass HashiCorp TA-002-P PDF Dumps Recently Updated 324 Questions [Q157-Q174] | TestBraindump

Pass HashiCorp TA-002-P PDF Dumps Recently Updated 324 Questions [Q157-Q174]

Share

Pass HashiCorp TA-002-P PDF Dumps | Recently Updated 324 Questions

Updated Test Engine to Practice TA-002-P Dumps & Practice Exam

NEW QUESTION 157
The Terraform language does not support user-defined functions, and so only the functions built in to the language are available for use.

  • A. True
  • B. False

Answer: A

Explanation:
Explanation
https://www.terraform.io/docs/configuration/functions.html

 

NEW QUESTION 158
lookup retrieves the value of a single element from which of the below data type?

  • A. string
  • B. map
  • C. set
  • D. list

Answer: B

Explanation:
Explanation
https://www.terraform.io/docs/configuration/functions/lookup.html

 

NEW QUESTION 159
Terraform validate reports syntax check errors from which of the following scenarios?

  • A. None of the above
  • B. The state files does not match the current infrastructure
  • C. Code contains tabs indentation instead of spaces
  • D. There is missing value for a variable

Answer: D

 

NEW QUESTION 160
A variable az has the following default value. What will be the datatype of the variable?
az=["us-west-1a","us-east-1a"]

  • A. String
  • B. Map
  • C. List
  • D. Object

Answer: C

 

NEW QUESTION 161
You want to know from which paths Terraform is loading providers referenced in your Terraform configuration (*.tf files). You need to enable debug messages to find this out.
Which of the following would achieve this?

  • A. Set verbose logging for each provider in your Terraform configuration
  • B. Set the environment variable TF_LOG=TRACE
  • C. Set the environment variable TF_LOG_PATH
  • D. Set the environment variable TF_VAR_log=TRACE

Answer: B

 

NEW QUESTION 162
Which of the following is an invalid variable name?

  • A. count
  • B. instance_name
    Explanation
    https://www.terraform.io/intro/examples/count.html
  • C. web
  • D. var1

Answer: A

 

NEW QUESTION 163
Terraform can run on Windows or Linux, but it requires a Server version of the Windows operating system.

  • A. True
  • B. False

Answer: A

Explanation:
Reference: https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster-windows

 

NEW QUESTION 164
Why is it a good idea to declare the required version of a provider in a Terraform configuration file?
1. terraform
2. {
3. required_providers
4. {
5. aws = "~> 1.0"
6. }
7. }

  • A. To ensure that the provider version matches the version of Terraform you are using.
  • B. To remove older versions of the provider.
  • C. Providers are released on a separate schedule from Terraform itself; therefore a newer version could introduce breaking changes.
  • D. To match the version number of your application being deployed via Terraform.

Answer: C

 

NEW QUESTION 165
A user has created three workspaces using the command line - prod, dev, and test. The user wants to create a fourth workspace named stage. Which command will the user execute to accomplish this?

  • A. terraform workspace create stage
  • B. terraform workspace new stage
  • C. terraform workspace -new stage
  • D. terraform workspace -create stage

Answer: B

Explanation:
The terraform workspace new command is used to create a new workspace.
https://www.terraform.io/docs/commands/workspace/new.html

 

NEW QUESTION 166
Select the answer below that completes the following statement: Terraform Cloud can be managed from the CLI but requires __________?

  • A. an API token
  • B. authentication using MFA
  • C. a username and password
  • D. a TOTP token

Answer: A

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 167
State is a requirement for Terraform to function

  • A. True
  • B. False

Answer: A

Explanation:
Explanation
State is a necessary requirement for Terraform to function. It is often asked if it is possible for Terraform to work without state, or for Terraform to not use state and just inspect cloud resources on every run.
Purpose of Terraform State
State is a necessary requirement for Terraform to function. It is often asked if it is possible for Terraform to work without state, or for Terraform to not use state and just inspect cloud resources on every run. This page will help explain why Terraform state is required.
As you'll see from the reasons below, state is required. And in the scenarios where Terraform may be able to get away without state, doing so would require shifting massive amounts of complexity from one place (state) to another place (the replacement concept).
1. Mapping to the Real World
Terraform requires some sort of database to map Terraform config to the real world. When you have a resource resource "aws_instance" "foo" in your configuration, Terraform uses this map to know that instance i- abcd1234 is represented by that resource.
For some providers like AWS, Terraform could theoretically use something like AWS tags. Early prototypes of Terraform actually had no state files and used this method. However, we quickly ran into problems. The first major issue was a simple one: not all resources support tags, and not all cloud providers support tags.
Therefore, for mapping configuration to resources in the real world, Terraform uses its own state structure.
2. Metadata
Alongside the mappings between resources and remote objects, Terraform must also track metadata such as resource dependencies.
Terraform typically uses the configuration to determine dependency order. However, when you delete a resource from a Terraform configuration, Terraform must know how to delete that resource. Terraform can see that a mapping exists for a resource not in your configuration and plan to destroy. However, since the configuration no longer exists, the order cannot be determined from the configuration alone.
To ensure correct operation, Terraform retains a copy of the most recent set of dependencies within the state.
Now Terraform can still determine the correct order for destruction from the state when you delete one or more items from the configuration.
One way to avoid this would be for Terraform to know a required ordering between resource types. For example, Terraform could know that servers must be deleted before the subnets they are a part of. The complexity for this approach quickly explodes, however: in addition to Terraform having to understand the ordering semantics of every resource for every cloud, Terraform must also understand the ordering across providers.
Terraform also stores other metadata for similar reasons, such as a pointer to the provider configuration that was most recently used with the resource in situations where multiple aliased providers are present.
3. Performance
In addition to basic mapping, Terraform stores a cache of the attribute values for all resources in the state. This is the most optional feature of Terraform state and is done only as a performance improvement.
When running a terraform plan, Terraform must know the current state of resources in order to effectively determine the changes that it needs to make to reach your desired configuration.
For small infrastructures, Terraform can query your providers and sync the latest attributes from all your resources. This is the default behavior of Terraform: for every plan and apply, Terraform will sync all resources in your state.
For larger infrastructures, querying every resource is too slow. Many cloud providers do not provide APIs to query multiple resources at once, and the round trip time for each resource is hundreds of milliseconds. On top of this, cloud providers almost always have API rate limiting so Terraform can only request a certain number of resources in a period of time. Larger users of Terraform make heavy use of the -refresh=false flag as well as the -target flag in order to work around this. In these scenarios, the cached state is treated as the record of truth.
4. Syncing
In the default configuration, Terraform stores the state in a file in the current working directory where Terraform was run. This is okay for getting started, but 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.
Remote state is the recommended solution to this problem. With a fully-featured state backend, Terraform can use remote locking as a measure to avoid two or more different users accidentally running Terraform at the same time, and thus ensure that each Terraform run begins with the most recent updated state.

 

NEW QUESTION 168
HashiCorp offers multiple versions of Terraform, including Terraform open-source, Terraform Cloud, and Terraform Enterprise. Which of the following Terraform features are only available in the Enterprise edition?
(select four)

  • A. Sentinel
  • B. Audit Logs
  • C. Clustering
  • D. SAML/SSO
  • E. Private Module Registry
  • F. Private Network Connectivity

Answer: B,D,F

Explanation:
Explanation
While there are a ton of features that are available to open source users, many features that are part of the Enterprise offering are geared towards larger teams and enterprise functionality. To see what specific features are part of Terraform Cloud and Terraform Enterprise, check out this link.
https://www.hashicorp.com/products/terraform/pricing/

 

NEW QUESTION 169
Which of the following connection types are supported by the remote-exec provisioner? (select two)

  • A. ssh
  • B. SMB
  • C. UDP
  • D. WinRM
  • E. RDP

Answer: A,D

Explanation:
Explanation
The remote-exec provisioner invokes a script on a remote resource after it is created. The remote-exec provisioner supports both ssh and winrm type connections.
remote-exec connection types -
* ssh on Linux
* winrm on Windows
https://www.terraform.io/docs/provisioners/remote-exec.html

 

NEW QUESTION 170
Multiple provider instances blocks for AWS can be part of a single configuration file?

  • A. True
  • B. False

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 configuration
provider "aws" {
region = "us-east-1"
}
# Additional provider configuration for west coast region
provider "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.html#alias-multiple-provider-instances

 

NEW QUESTION 171
While Terraform is generally written using the HashiCorp Configuration Language (HCL), what other syntax can Terraform are expressed in?

  • A. YAML
  • B. JSON
  • C. TypeScript
  • D. XML

Answer: B

Explanation:
Explanation
The constructs in the Terraform language can also be expressed in JSON syntax, which is harder for humans to read and edit but easier to generate and parse programmatically.

 

NEW QUESTION 172
One remote backend configuration always maps to a single remote workspace.

  • A. True
  • B. False

Answer: A

Explanation:
Reference: https://www.terraform.io/docs/language/settings/backends/remote.html

 

NEW QUESTION 173
Select the operating systems which are supported for a clustered Terraform Enterprise: (select four)

  • A. CentOS
  • B. Ubuntu
    Explanation
    https://www.terraform.io/docs/enterprise/before-installing/index.html#operating-systemrequirements
  • C. Unix
  • D. Amazon Linux
  • E. Red Hat

Answer: A,B,D,E

 

NEW QUESTION 174
......

HashiCorp TA-002-P Dumps Cover Real Exam Questions: https://actualtests.testbraindump.com/TA-002-P-exam-prep.html