New 2024 Realistic TA-002-P Dumps Test Engine Exam Questions in here [Q35-Q52]

Share

New 2024 Realistic TA-002-P Dumps Test Engine Exam Questions in here

Updated Official licence for TA-002-P Certified by TA-002-P Dumps PDF

NEW QUESTION # 35
Terraform will sync all resources in state by default for every plan and apply, hence for larger infrastructures
this can slow down terraform plan and terraform apply commands?

  • A. False
  • B. True

Answer: B

Explanation:
Explanation
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.
https://www.terraform.io/docs/state/purpose.html


NEW QUESTION # 36
How would you reference the Volume IDs associated with the ebs_block_device blocks in this configuration?

  • A. aws_instance.example.ebs_block_device.[*].volume_id
  • B. aws_instance.example.ebs_block_device[sda2,sda3].volume_id
  • C. aws_instance.example.ebs_block_device.volume_id
  • D. aws_instance.example.ebs_block_device.*.volume_id

Answer: A

Explanation:
Explanation
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html


NEW QUESTION # 37
Which command lets you experiment with Terraform's built-in functions?

  • A. terraform console
  • B. terraform env
  • C. terraform validate
  • D. terraform test

Answer: A

Explanation:
Explanation
https://www.terraform.io/cli/commands/console


NEW QUESTION # 38
The_________determines how Terraform creates, updates, or delete resources.

  • A. Terraform provider
  • B. Terraform core
  • C. Terraform provisioner
  • D. Terraform configuration

Answer: A

Explanation:
This is what determines how Terraform creates, updates, or deletes resources, as it is responsible for understanding API interactions with some service and exposing resources and data sources based on that API.


NEW QUESTION # 39
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 # 40
During a terraform apply, a resource is successfully created but eventually fails during provisioning. What
happens to the resource?

  • A. The failure of provisioner will be ignored and it will not cause a failure to terraform apply
  • B. The resource will be automatically destroyed.
  • C. The resource will be planned for destruction and recreation upon the next terraform apply
  • D. Terraform will retry to provision again.

Answer: C

Explanation:
Explanation
If a creation-time provisioner fails, the resource is marked as tainted. A tainted resource will be planned for
destruction and recreation upon the next terraform apply. Terraform does this because a failed provisioner can
leave a resource in a semi-configured state. Because Terraform cannot reason about what the provisioner does,
the only way to ensure proper creation of a resource is to recreate it. This is tainting.
You can change this behavior by setting the on_failure attribute, which is covered in detail below.
https://www.terraform.io/docs/provisioners/index.html#creation-time-provisioners
https://www.terraform.io/docs/provisioners/index.html#destroy-time-provisioners
https://www.terraform.io/docs/provisioners/index.html#failure-behavior


NEW QUESTION # 41
What is the result of the following terraform function call?

  • A. hello
  • B. goodbye
  • C. what?

Answer: C

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


NEW QUESTION # 42
How is the Terraform remote backend different than other state backends such as S3, Consul, etc.?

  • A. It doesn't show the output of a terraform apply locally
  • B. It is only available to paying customers
  • C. All of the above
  • D. It can execute Terraform runs on dedicated infrastructure on premises or in Terraform Cloud

Answer: D

Explanation:
Explanation
If you and your team are using Terraform to manage meaningful infrastructure, we recommend using the remote backend with Terraform Cloud or Terraform Enterprise.
Reference: https://www.terraform.io/docs/language/settings/backends/index.html


NEW QUESTION # 43
HashiCorp Configuration Language (HCL) supports user-defined functions.

  • A. True
  • B. False

Answer: B


NEW QUESTION # 44
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. 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.
  • B. 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).
  • C. 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.
  • 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: B

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


NEW QUESTION # 45
A user runs terraform init on their RHEL based server and per the output, two provider plugins are downloaded: $ terraform init Initializing the backend...
Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...
- Downloading plugin for provider "random" (hashicorp/random) 2.2.1...
:
Terraform has been successfully initialized! Where are these plugins downloaded to?

  • A. The .terraform.plugins directory in the directory terraform init was executed in.
  • B. The .terraform.d directory in the directory terraform init was executed in.
  • C. The .terraform/plugins directory in the directory terraform init was executed in.
  • D. /etc/terraform/plugins

Answer: C


NEW QUESTION # 46
Which of the following type of variable allows multiple values of several distinct types to be grouped together
as a single value?

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

Answer: A,D

Explanation:
Explanation
Structural type of variable allows multiple values of several distinct types to be grouped together as a single
value. They require a schema as an argument, to specify which types are allowed for which elements.
https://www.terraform.io/docs/configuration/types.html


NEW QUESTION # 47
When using providers that require the retrieval of data, such as the HashiCorp Vault provider, in what phase does Terraform actually retrieve the data required?

  • A. terraform delete
  • B. terraform apply
  • C. terraform init
  • D. terraform plan

Answer: C


NEW QUESTION # 48
Given the Terraform configuration below, in which order will the resources be created?
1. resource "aws_instance" "web_server"
2. {
3. ami = "ami-b374d5a5"
4. instance_type = "t2.micro"
5. }
6. resource "aws_eip" "web_server_ip"
7. {
8. vpc = true instance = aws_instance.web_server.id
9. }

  • A. Resources will be created simultaneously
  • B. aws_eip will be created first
    aws_instance will be created second
  • C. aws_instance will be created first
    aws_eip will be created second
  • D. aws_eip will be created first
    aws_instance will be created second

Answer: C

Explanation:
Explanation
Implicit and Explicit Dependencies
By studying the resource attributes used in interpolation expressions, Terraform can automatically infer when
one resource depends on another. In the example above, the reference to aws_instance.web_server.id creates
an implicit dependency on the aws_instance named web_server.
Terraform uses this dependency information to determine the correct order in which to create the different
resources.
# Example of Implicit Dependency
resource "aws_instance" "web_server" {
ami = "ami-b374d5a5"
instance_type = "t2.micro"
}
resource "aws_eip" "web_server_ip" {
vpc = true
instance = aws_instance.web_server.id
}
In the example above, Terraform knows that the aws_instance must be created before the aws_eip.
Implicit dependencies via interpolation expressions are the primary way to inform Terraform about these
relationships, and should be used whenever possible.
Sometimes there are dependencies between resources that are not visible to Terraform. The depends_on
argument is accepted by any resource and accepts a list of resources to create explicit dependencies for.
For example, perhaps an application we will run on our EC2 instance expects to use a specific Amazon S3
bucket, but that dependency is configured inside the application code and thus not visible to Terraform. In that
case, we can use depends_on to explicitly declare the dependency:
# Example of Explicit Dependency
# New resource for the S3 bucket our application will use.
resource "aws_s3_bucket" "example" {
bucket = "terraform-getting-started-guide"
acl = "private"
}
# Change the aws_instance we declared earlier to now include "depends_on"
resource "aws_instance" "example" {
ami = "ami-2757f631"
instance_type = "t2.micro"
# Tells Terraform that this EC2 instance must be created only after the
# S3 bucket has been created.
depends_on = [aws_s3_bucket.example]
}
https://learn.hashicorp.com/terraform/getting-started/dependencies.html


NEW QUESTION # 49
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 the environment variable TF_VAR_log=TRACE
  • B. Set verbose logging for each provider in your Terraform configuration
  • C. Set the environment variable TF_LOG=TRACE
  • D. Set the environment variable TF_LOG_PATH

Answer: C


NEW QUESTION # 50
Given the Terraform configuration below, in which order will the resources be created?

  • A. resources will be created simultaneously
  • B. aws_instance will be created first aws_eip will be created second
  • C. aws_eip will be created first aws_instance will be created second
  • D. Larger image

Answer: B

Explanation:
Explanation
The aws_instance will be created first, and then aws_eip will be created second due to the aws_eip's resource
dependency of the aws_instance id


NEW QUESTION # 51
When using a remote backend or terraform Cloud integration, where does Terraform save resource sate?

  • A. In the remote backend or Terraform Cloud
  • B. In an environment variable
  • C. On the disk
  • D. In memory

Answer: A

Explanation:
This is where Terraform saves resource state when using a remote backend or Terraform Cloud integration, as it allows you to store and manage your state file in a remote location, such as a cloud storage service or Terraform Cloud's servers. This enables collaboration, security, and scalability for your Terraform infrastructure.


NEW QUESTION # 52
......

Grab latest HashiCorp TA-002-P Dumps as PDF Updated: https://prepaway.vcetorrent.com/TA-002-P-valid-vce-torrent.html