HashiCorp Certified: Terraform Associate — Question 107

You want to define multiple data disks as nested blocks inside the resource block for a virtual machine.

What Terraform feature would help you define the blocks using the values in a variable?

Answer options

Correct answer: C

Explanation

The correct answer is C, Dynamic blocks, which allow you to create multiple nested blocks based on a variable's values. Local values, collection functions, and count arguments do not provide the same capability for defining nested configurations dynamically.