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?
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?
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.
C is correct
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.
C. Dynamic blocks