Free VA-002-P Exam Braindumps (page: 26)

Page 26 of 51

After executing a terraform apply, you notice that a resource has a tilde (~) next to it. What does this infer?

  1. the resource will be destroyed and recreated
  2. the resource will be created
  3. Terraform can't determine how to proceed due to a problem with the state file
  4. the resource will be updated in place

Answer(s): D

Explanation:

The prefix -/+ means that Terraform will destroy and recreate the resource, rather than updating it in- place. Some attributes and resources can be updated in-place and are shown with the ~ prefix.



What does the command terraform fmt do?

  1. formats the state file in order to ensure the latest state of resources can be obtained
  2. updates the font of the configuration file to the official font supported by HashiCorp
  3. rewrite Terraform configuration files to a canonical format and style
  4. deletes the existing configuration file

Answer(s): C

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 Terraform language style conventions, along with other minor adjustments for readability.
Other Terraform commands that generate Terraform configuration will produce configuration files that conform to the style imposed by terraform fmt, so using this style in your own files will ensure consistency.



Select the feature below that best completes the sentence:
The following list represents the different types of __________ available in Terraform.
1. max
2. min
3. join
4. replace
5. list
6. length
7. range

  1. named values
  2. backends
  3. functions
  4. data sources

Answer(s): C

Explanation:

The Terraform language includes a number of built-in functions that you can call from within expressions to transform and combine values. The Terraform language does not support user-defined functions, and only the functions built into the language are available for use.



You have been given requirements to create a security group for a new application. Since your organization standardizes on Terraform, you want to add this new security group with the fewest number of lines

of code. What feature could you use to iterate over a list of required tcp ports to add to the new security group?

  1. terraform import
  2. splat expression
  3. dynamic block
  4. dynamic backend

Answer(s): C

Explanation:

A dynamic block acts much like a for expression but produces nested blocks instead of a complex typed value. It iterates over a given complex value and generates a nested block for each element of that complex value.



Page 26 of 51



Post your Comments and Discuss HashiCorp VA-002-P exam with other Community members:

Bruno commented on October 10, 2023
PDF is Vault, EXM is Teraform.
UNITED STATES
upvote