TA-002-P Dumps Special Discount for limited time Try FOR FREE [Q244-Q267]

Share

TA-002-P Dumps Special Discount for limited time Try FOR FREE

TA-002-P Dumps for success in Actual Exam Apr-2023]

NEW QUESTION 244
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. 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.
  • B. Add explicit dependency using depends_on . This will ensure the correct order of resource creation.
  • C. This will already be taken care of by terraform native implicit dependency. Nothing else needs to be done from your end.
  • D. 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.

Answer: B

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

 

NEW QUESTION 245
True or False: A list(...) contain a number of values of the same type while an object(...) can contain a number of values of different types.

  • A. False
  • B. True

Answer: B

Explanation:
Explanation
Collection Types
A collection type allows multiple values of one other type to be grouped together as a single value. The type of value within a collection is called its element type. All collection types must have an element type, which is provided as the argument to their constructor.
For example, the type list(string) means "list of strings", which is a different type than list(number), a list of numbers. All elements of a collection must always be of the same type.
The three kinds of collection type in the Terraform language are:
* list(...): a sequence of values identified by consecutive whole numbers starting with zero.
The keyword list is a shorthand for list(any), which accepts any element type as long as every element is the same type. This is for compatibility with older configurations; for new code, we recommend using the full form.
* map(...): a collection of values where each is identified by a string label.
The keyword map is a shorthand for map(any), which accepts any element type as long as every element is the same type. This is for compatibility with older configurations; for new code, we recommend using the full form.
* set(...): a collection of unique values that do not have any secondary identifiers or ordering.
https://www.terraform.io/docs/configuration/types.html
Structural Types
A structural type allows multiple values of several distinct types to be grouped together as a single value.
Structural types require a schema as an argument, to specify which types are allowed for which elements.
The two kinds of structural type in the Terraform language are:
* object(...): a collection of named attributes that each have their own type.
The schema for object types is { <KEY> = <TYPE>, <KEY> = <TYPE>, ... } - a pair of curly braces containing a comma-separated series of <KEY> = <TYPE> pairs. Values that match the object type must contain all of the specified keys, and the value for each key must match its specified type. (Values with additional keys can still match an object type, but the extra attributes are discarded during type conversion.)
* tuple(...): a sequence of elements identified by consecutive whole numbers starting with zero, where each element has its own type.
The schema for tuple types is [<TYPE>, <TYPE>, ...] - a pair of square brackets containing a comma-separated series of types. Values that match the tuple type must have exactly the same number of elements (no more and no fewer), and the value in each position must match the specified type for that position.
For example: an object type of object({ name=string, age=number }) would match a value like the following:
{
name = "John"
age = 52
}
Also, an object type of object({ id=string, cidr_block=string }) would match the object produced by a reference to an aws_vpc resource, like aws_vpc.example_vpc; although the resource has additional attributes, they would be discarded during type conversion.
Finally, a tuple type of tuple([string, number, bool]) would match a value like the following:
["a", 15, true]
https://www.terraform.io/docs/configuration/types.html

 

NEW QUESTION 246
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. non-traditional
  • B. a private install
  • C. disconnected
  • D. air-gapped

Answer: A

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 247
Which of the following is not an action performed by terraform init?

  • A. Create a sample main.tf file
  • B. Initialize a configured backend
  • C. Load required provider plugins
  • D. Retrieve the source code for all referenced modules

Answer: A

 

NEW QUESTION 248
Multiple providers can be declared within a single Terraform configuration file.

  • A. False
  • B. True

Answer: B

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

 

NEW QUESTION 249
Which Terraform collection type should you use to store key/value pairs?

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

Answer: C

 

NEW QUESTION 250
You want to get involved in the development of Terraform. As this is an open source project, you would like to contribute a fix for an open issue of Terraform. What programming language will need to use to write the fix?

  • A. Java
  • B. It depends on which command issue related to.
  • C. Go
  • D. Python

Answer: C

Explanation:
Explanation
Basic programming knowledge. Terraform and Terraform Plugins are written in the Go programming language, but even if you've never written a line of Go before, you're still welcome to take a dive into the code and submit patches. The community is happy to assist with code reviews and offer guidance specific to Go.

 

NEW QUESTION 251
You're preparing to install Terraform on client workstations and want to see which operating systems are
supported. Which of the following operating systems is supported?

  • A. Amazon Linux
  • B. Windows
  • C. All of the above
  • D. FreeBSD
  • E. MacOS
  • F. Solaris

Answer: C

 

NEW QUESTION 252
Which of the following value will be accepted for my_var?
1. variable "my_var"
2. {
3. type = string
4. }

  • A. None of the above
  • B. Both A and B
  • C. "15"
  • D. 0

Answer: B

Explanation:
Explanation
The Terraform language will automatically convert number and bool values to string values when needed, and vice-versa as long as the string contains a valid representation of a number or boolean value.
Example
* true converts to "true", and vice-versa
* false converts to "false", and vice-versa
* 15 converts to "15", and vice-versa
Where possible, Terraform automatically converts values from one type to another in order to produce the expected type. If this isn't possible, Terraform will produce a type mismatch error and you must update the configuration with a more suitable expression.
https://www.terraform.io/docs/configuration/expressions.html#type-conversion

 

NEW QUESTION 253
Which provider authentication method prevents credentials from being stored in the state file?

  • A. Specifying the login credentials in the provider block
  • B. Using environment variables
  • C. Setting credentials as Terraform variables
  • D. None of the above

Answer: B

 

NEW QUESTION 254
While attempting to deploy resources into your cloud provider using Terraform. you begin to see some odd behavior and experience sluggish responses. In order to troubleshoot you decide to turn on Terraform debugging. Which environment variables must be configured to make Terraform's logging more verbose?

  • A. TF_LOG
  • B. TF.LOG.FUE
  • C. TF_10G_LEVEL
  • D. TF_10G_PATM

Answer: A

 

NEW QUESTION 255
The terraform state command can be used to ____

  • A. Print the current state file in console
  • B. It is not a valid command
  • C. Update current state
  • D. Refresh existing state file

Answer: C

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

 

NEW QUESTION 256
Terraform Enterprise (also referred to as pTFE) requires what type of backend database for a clustered deployment?

  • A. MySQL
  • B. Cassandra
  • C. PostgreSQL
  • D. MSSQL
    Explanation
    External Services mode stores the majority of the stateful data used by the instance in an external PostgreSQL database and an external S3-compatible endpoint or Azure blob storage. There is still critical data stored on the instance that must be managed with snapshots. Be sure to check the PostgreSQL Requirements for information that needs to be present for Terraform Enterprise to work. This option is best for users with expertise managing PostgreSQL or users that have access to managed PostgreSQL offerings like AWS RDS.

Answer: C

 

NEW QUESTION 257
When using multiple configurations of the same Terraform provider, what meta-argument must be included in any non-default provider configurations?

  • A. depends_on
  • B. name
  • C. id
  • D. alias

Answer: D

 

NEW QUESTION 258
Which Terraform command will force a marked resource to be destroyed and recreated on the next apply?

  • A. terraform taint
  • B. terraform destroy
  • C. terraform refresh
  • D. terraform fmt

Answer: A

Explanation:
The terraform taint command manually marks a Terraform-managed resource as tainted, forcing it to be destroyed and recreated on the next apply.
This command will not modify infrastructure, but does modify the state file in order to mark a resource as tainted. Once a resource is marked as tainted, the next plan will show that the resource will be destroyed and recreated and the next apply will implement this change.
Forcing the recreation of a resource is useful when you want a certain side effect of recreation that is not visible in the attributes of a resource. For example: re-running provisioners will cause the node to be different or rebooting the machine from a base image will cause new startup scripts to run.
Note that tainting a resource for recreation may affect resources that depend on the newly tainted resource. For example, a DNS resource that uses the IP address of a server may need to be modified to reflect the potentially new IP address of a tainted server. The plan command will show this if this is the case.
https://www.terraform.io/docs/commands/taint.html

 

NEW QUESTION 259
Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.

  • A. False
  • B. True

Answer: B

Explanation:
Explanation
"Use the depends_on meta-argument to handle hidden resource or module dependencies that Terraform cannot
automatically infer. You only need to explicitly specify a dependency when a resource or module relies on
another resource's behavior but does not access any of that resource's data in its arguments."
https://www.terraform.io/language/meta-arguments/depends_on

 

NEW QUESTION 260
In regards to Terraform state file, select all the statements below which are correct?

  • A. Storing state remotely can provide better security.
  • B. Terraform Cloud always encrypts state at rest.
  • C. Using the mask feature, you can instruct Terraform to mask sensitive data in the state file.
  • D. The Terraform state can contain sensitive data, therefore the state file should be protected from unauthorized access.
  • E. When using local state, the state file is stored in plain-text.
  • F. The state file is always encrypted at rest.

Answer: A,B,D,E

Explanation:
Terraform state 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.
When using remote state, state is only ever held in memory when used by Terraform. It may be encrypted at rest, but this depends on the specific remote state backend.
Storing Terraform state remotely can provide better security. As of Terraform 0.9, Terraform does not persist state to the local disk when remote state is in use, and some backends can be configured to encrypt the state data at rest.
Recommendations
If you manage any sensitive data with Terraform (like database passwords, user passwords, or private keys), treat the state itself as sensitive data.
Storing state remotely can provide better security. As of Terraform 0.9, Terraform does not persist state to the local disk when remote state is in use, and some backends can be configured to encrypt the state data at rest.
For example:
* 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.
* The S3 backend supports encryption at rest when the encrypt option is enabled. IAM policies and logging can be used to identify any invalid access. Requests for the state go over a TLS connection.

 

NEW QUESTION 261
Multiple configurations for the same provider can be used in a single configuration file.

  • A. False
  • B. True

Answer: B

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 262
Which one is the right way to import a local module names consul?

  • A. module "consul" { source = "module/consul"}
  • B. module "consul" { source = "./consul"}
  • C. module "consul" { source = "consul"}
  • D. module "consul" { source = "../consul"}

Answer: B,D

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"
}

 

NEW QUESTION 263
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 regular expression named module.web_server
  • B. By querying the AWS EC2 API to retrieve the IP address
  • C. Value of the web_server parameter from the variables.tf file
  • D. The output of a module named web_server

Answer: D

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 264
Which of the below commands will rename a EC2 instance without destroying and recreating it?

  • A. terraform state mv
  • B. terraform mv
  • C. terraform plan mv
  • D. terraform plan

Answer: A

 

NEW QUESTION 265
A Terraform local value can reference other Terraform local values.

  • A. False
  • B. True

Answer: B

 

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

  • A. True
  • B. False

Answer: B

Explanation:
Explanation
https://www.terraform.io/language/functions
The Terraform language does not support user-defined functions, and so only the functions built into the
language are available for use

 

NEW QUESTION 267
......

Accurate TA-002-P Answers 365 Days Free Updates: https://validtorrent.prep4pass.com/TA-002-P_exam-braindumps.html