nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #19

What is one disadvantage of using dynamic blocks in Terraform?

The correct answer is D. They make configuration harder to read and understand. Dynamic blocks allow you to programmatically generate repeated nested configuration blocks using for_each, which is a powerful feature (not a disadvantage). The key trade-off and primary disadvantage is that they make the configuration significantly harder to read and understand

Submitted by zhang_li· Apr 18, 2026Work with Terraform Configurations

Question

What is one disadvantage of using dynamic blocks in Terraform?

Options

  • ADynamic blocks can construct repeatable nested blocks
  • BTerraform will run more slowly
  • CThey cannot be used to loop through a list of values
  • DThey make configuration harder to read and understand

How the community answered

(59 responses)
  • A
    2% (1)
  • B
    3% (2)
  • C
    2% (1)
  • D
    93% (55)

Explanation

Dynamic blocks allow you to programmatically generate repeated nested configuration blocks using for_each, which is a powerful feature (not a disadvantage). The key trade-off and primary disadvantage is that they make the configuration significantly harder to read and understand (D) - a reader must mentally evaluate the dynamic expression to know what nested blocks will actually be generated, rather than reading them explicitly. Option A describes a benefit. Option B is false. Option C is false - dynamic blocks can and do iterate over lists.

Topics

#Dynamic Blocks#Terraform Language#Configuration Readability#Code Maintainability

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice