[Jan-2024] TA-002-P PDF Dumps Are Helpful To produce Your Dreams Correct QA's [Q32-Q51]

Share

[Jan-2024] TA-002-P PDF Dumps Are Helpful To produce Your Dreams Correct QA's

New TA-002-P exam Free Sample Questions to Practice

NEW QUESTION # 32
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 # 33
Where can Terraform not load a provider from?

  • A. Source code
  • B. Provider plugin chance
  • C. Official HashCrop Distribution on releases.hashcrop.com
  • D. Plugins directory

Answer: A

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
1. resource "aws_s3_bucket" "example" {
2. bucket = "my-test-s3-terraform-bucket"
3. ...} resource "aws_iam_role" "test_role" {
4. name = "test_role"
5. ...}
Due to the way that the application code is written, the s3 bucket must be created before the test role is created, otherwise there will be a problem. How can you ensure that?

  • A. This is not possible to control in terraform . Terraform will take care of it in a native way , and create a dependency graph that is best suited for the parallel resource creation.
  • B. Create 2 separate terraform config scripts , and run them one by one , 1 for s3 bucket , and another for IAM role , run the S3 bucket script first.
  • C. Add explicit dependency using depends_on . This will ensure the correct order of resource creation.
  • D. This will already be taken care of by terraform native implicit dependency. Nothing else needs to be done from your end.

Answer: C

Explanation:
Implicit dependency works only if there is some reference of one resource to another. Explicit dependency is the option here.


NEW QUESTION # 35
In the example below, where is the value of the DNS record's IP address originating from?
1. resource "aws_route53_record" "www"
2. {
3. zone_id = aws_route53_zone.primary.zone_id
4. name = "www.example.com"
5. type = "A"
6. ttl = "300"
7. records = [module.web_server.instance_ip_address]
8. }

  • A. The output of a module named web_server
  • B. By querying the AWS EC2 API to retrieve the IP address
  • C. The regular expression named module.web_server
  • D. Value of the web_server parameter from the variables.tf file

Answer: A

Explanation:
Explanation
In a parent module, outputs of child modules are available in expressions as module.<MODULE NAME>.<OUTPUT NAME>.
For example, if a child module named web_server declared an output named instance_ip_address, you could access that value as module.web_server.instance_ip_address.


NEW QUESTION # 36
Talal is a DevOps engineer and he has deployed the production infrastructure using Terraform. He is using a
very large configuration file to maintain and update the actual infrastructure. As the infrastructure have grown
to a very complex and large, he has started experiencing slowness when he run runs terraform plan. What are
the options for him to resolve this slowness?

  • A. Use -refresh=false flag as well as the -target flag with terraform plan in order to work around this.
  • B. Use -refresh=true flag as well as the -target flag with terraform plan in order to work around this.
  • C. Break large configurations into several smaller configurations that can each be independently applied.
  • D. Run terraform refresh every time before running terraform plan.

Answer: A,C

Explanation:
Explanation
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.
Although 'Use -refresh=false flag as well as the -target flag with terraform plan in order to work around this.' is
a solution, but its not always recommended. Instead of using -target as a means to operate on isolated portions
of very large configurations, prefer instead to break large configurations into several smaller configurations
that can each be independently applied. Data sources can be used to access information about resources
created in other configurations, allowing a complex system architecture to be broken down into more
manageable parts that can be updated independently.
Option 'Run terraform refresh every time before running terraform plan.' and 'Use -refresh=true flag as well as
the -target flag with terraform plan in order to work around this.' is not correct because in both the cases
terraform will query every resources of the infrastructure.


NEW QUESTION # 37
When using a module block to reference a module stored on the public Terraform Module Registry such as:

How do you specify version 1.0.0?

  • A. Nothing - modules stored on the public Terraform Module Registry always default to version 1.0.0
  • B. Modules stored on the public Terraform Module Registry do not support versioning
  • C. Append ?ref=v1.0.0 argument to the source path
  • D. Add version = "1.0.0" attribute to module block

Answer: B

Explanation:
Reference: https://www.terraform.io/docs/language/modules/sources.html


NEW QUESTION # 38
When writing Terraform code, HashiCorp recommends that you use how many spaces between each nesting
level?

  • A. 0
  • B. 1
  • C. 2
  • D. 3

Answer: A

Explanation:
Explanation
The Terraform parser allows you some flexibility in how you lay out the elements in your configuration files,
but the Terraform language also has some idiomatic style conventions which we recommend users always
follow for consistency between files and modules written by different teams. Automatic source code
formatting tools may apply these conventions automatically.
Indent two spaces for each nesting level.
When multiple arguments with single-line values appear on consecutive lines at the same nesting level, align
their equals signs:
ami = "abc123"
instance_type = "t2.micro"
When both arguments and blocks appear together inside a block body, place all of the arguments together at
the top and then place nested blocks below them. Use one blank line to separate the arguments from the
blocks.
Use empty lines to separate logical groups of arguments within a block.
For blocks that contain both arguments and "meta-arguments" (as defined by the Terraform language
semantics), list meta-arguments first and separate them from other arguments with one blank line. Place
meta-argument blocks last and separate them from other blocks with one blank line.
resource "aws_instance" "example" {
count = 2 # meta-argument first
ami = "abc123"
instance_type = "t2.micro"
network_interface {
# ...
}
lifecycle { # meta-argument block last
create_before_destroy = true
}
}
Top-level blocks should always be separated from one another by one blank line. Nested blocks should also be
separated by blank lines, except when grouping together related blocks of the same type (like multiple
provisioner blocks in a resource).
Avoid separating multiple blocks of the same type with other blocks of a different type, unless the block types
are defined by semantics to form a family. (For example: root_block_device, ebs_block_device and
ephemeral_block_device on aws_instance form a family of block types describing AWS block devices, and
can therefore be grouped together and mixed.)


NEW QUESTION # 39
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 an explicit dependency for the Launch Configuration using the depends_on meta-parameter.
  • B. You need to configure the Launch Configuration's create_before_destroy meta-parameter.
  • C. You need to configure an explicit dependency for the Auto Scaling group using the depends_on meta-parameter.
  • D. You need to configure the Auto Scaling group's create_before_destroy meta-parameter.

Answer: B

Explanation:
Explanation
https://www.terraform.io/docs/providers/aws/r/launch_configuration.html#using-withautoscaling-groups


NEW QUESTION # 40
Which of the following clouds does not have a provider maintained HashiCorp?

  • A. OpenStack
  • B. DigitalOcean
  • C. AWS
  • D. IBM Cloud

Answer: D

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


NEW QUESTION # 41
A Terraform provider is not responsible for:

  • A. Provisioning infrastructure in multiple clouds
  • B. Managing actions to take based on resource differences
  • C. Understanding API interactions with some service
  • D. Exposing resources and data sources based on an API

Answer: B


NEW QUESTION # 42
You want terraform plan and terraform apply to be executed in Terraform Cloud's run environment but the
output is to be streamed locally. Which one of the below you will choose?

  • A. Remote Backends.
  • B. Terraform Backends.
  • C. This can be done using any of the local or remote backends.
  • D. Local Backends.

Answer: A

Explanation:
Explanation
When using full remote operations, operations like terraform plan or terraform apply can be executed in
Terraform Cloud's run environment, with log output streaming to the local terminal. Remote plans and applies
use variable values from the associated Terraform Cloud workspace.
Terraform Cloud can also be used with local operations, in which case only state is stored in the Terraform
Cloud backend.
https://www.terraform.io/docs/backends/types/remote.html


NEW QUESTION # 43
Which is the best way to specify a tag of v1.0.0 when referencing a module stored in Git (for example
git::https://example.com/vpc.git)?

  • A. Nothing " modules stored on GitHub always default to version 1.0.0
  • B. Modules stored on GitHub do not support versioning
  • C. Append ref=v1. 0. 0 argument to the source path Most Voted
  • D. Add version = "1.0.0" parameter to module block

Answer: C

Explanation:
Explanation
https://www.terraform.io/language/modules/sources#selecting-a-revision


NEW QUESTION # 44
You need to deploy resources into two different cloud regions in the same Terraform configuration. To do that,
you declare multiple provider configurations as follows:

What meta-argument do you need to configure in a resource block to deploy the resource to the "us-west-2"
AWS region?

  • A. provider = west
  • B. provider = aws.west
  • C. alias = west
  • D. alias = aws.west

Answer: B

Explanation:
Explanation
https://www.terraform.io/language/providers/configuration


NEW QUESTION # 45
Which of the following is available only in Terraform Enterprise or Cloud workspaces and not in Terraform CLI?

  • A. Support for multiple cloud providers
  • B. Using the workspace as a data source
  • C. Dry runs with terraform plan
  • D. Secure variable storage

Answer: A

Explanation:
Reference: https://www.terraform.io/docs/language/providers/configuration.html


NEW QUESTION # 46
Which task does terraform init not perform?

  • A. Connects to the backend
  • B. Sources any modules and copies the configuration locally
  • C. Validates all required variables are present
  • D. Sources all providers present in the configuration and ensures they are downloaded and available locally

Answer: C

Explanation:
Reference: https://www.terraform.io/docs/cli/commands/init.html


NEW QUESTION # 47
All Terraform Cloud tiers support team management and governance.

  • A. True
  • B. False

Answer: B

Explanation:
Explanation
https://www.terraform.io/cloud-docs/overview
Terraform Cloud is a commercial SaaS product developed by HashiCorp. Many of its features are free for
small teams, including remote state storage, remote runs, and VCS connections. We also offer paid plans for
larger teams that include additional collaboration and governance features. Each higher paid upgrade plan is a
strict superset of any lower plans - for example, the Team & Governance plan includes all of the features of
the Team plan.


NEW QUESTION # 48
What does state looking accomplish?

  • A. Copies the state file from memory to disk
  • B. Blocks Terraform commands from modifying, the state file
  • C. Prevent accidental Prevent accident deletion of the state file
  • D. Encrypts any credentials stored within the state file

Answer: B

Explanation:
This is what state locking accomplishes, by preventing other users from modifying the state file while a Terraform operation is in progress. This prevents conflicts and data loss.


NEW QUESTION # 49
The Terraform CLI will print output values from a child module after running terraform apply.

  • A. True
  • B. False

Answer: A


NEW QUESTION # 50
When Terraform needs to be installed in a location where it does not have internet access to download the installer and upgrades, the installation is generally known as to be __________.

  • A. air-gapped
  • B. disconnected
  • C. a private install
  • D. non-traditional

Answer: D

Explanation:
Explanation
A Terraform Enterprise install that is provisioned on a network that does not have Internet access is generally known as an air-gapped install. These types of installs require you to pull updates, providers, etc. from external sources vs. being able to download them directly.


NEW QUESTION # 51
......

Cover TA-002-P Exam Questions Make Sure You 100% Pass: https://freedownload.prep4sures.top/TA-002-P-real-sheets.html