nerdexam
HashiCorp

TA-002-P · Question #111

ABC Enterprise has recently tied up with multiple small organizations for exchanging database information. Due to this, the firewall rules are increasing and are more than 100 rules. This is leading…

The correct answer is C. Dynamic Blocks. Dynamic blocks are the most effective way to manage a large, repetitive set of similar configuration elements, such as numerous firewall rules, by generating them programmatically.

Read, generate, and modify configuration

Question

ABC Enterprise has recently tied up with multiple small organizations for exchanging database information. Due to this, the firewall rules are increasing and are more than 100 rules. This is leading firewall configuration file that is difficult to manage. What is the way this type of configuration can be managed easily?

Options

  • ATerraform Backends
  • BTerraform Functions
  • CDynamic Blocks
  • DTerraform Expression

How the community answered

(36 responses)
  • A
    14% (5)
  • B
    3% (1)
  • C
    78% (28)
  • D
    6% (2)

Why each option

Dynamic blocks are the most effective way to manage a large, repetitive set of similar configuration elements, such as numerous firewall rules, by generating them programmatically.

ATerraform Backends

Terraform Backends are used for storing state, which is unrelated to managing and generating repetitive configuration blocks.

BTerraform Functions

Terraform Functions perform operations on data and expressions but do not directly generate arbitrary configuration blocks for resources in a structured way to handle repetitive configurations.

CDynamic BlocksCorrect

Dynamic blocks allow you to construct repeatable nested configuration blocks within a resource or data source, which is ideal for generating multiple similar elements like firewall rules based on a collection of input data, making the configuration file much more manageable.

DTerraform Expression

Terraform Expression is a general term for any value or calculation in Terraform, not a specific feature designed to manage or generate repetitive configuration blocks.

Concept tested: Dynamic blocks for repetitive configuration

Source: https://developer.hashicorp.com/terraform/language/expressions/dynamic-blocks

Topics

#Dynamic Blocks#Configuration Management#Repetitive Configuration#Nested Blocks

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice