Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 210

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?

    Correct Answer: C

    To define multiple data disks as nested blocks inside the resource block for a virtual machine using values in a variable, the Terraform feature you need is dynamic blocks. Dynamic blocks allow you to iterate over a list or map and create multiple instances of a nested block within a resource, making it possible to use the values in a variable to generate multiple configurations.

Discussion
ArizonaClassicsOption: C

C is correct

AbuuOption: C

The correct answer is C. Dynamic Blocks. Dynamic blocks allow you to define multiple data disks as nested blocks inside the resource block for a virtual machine by using the values in a variable. Dynamic blocks are used to create multiple resource instances from a single configuration block by iterating over the values of a list or map.

campsOption: C

C. Dynamic blocks