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.
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)- A14% (5)
- B3% (1)
- C78% (28)
- D6% (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.
Terraform Backends are used for storing state, which is unrelated to managing and generating repetitive configuration blocks.
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.
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.
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
Community Discussion
No community discussion yet for this question.