TERRAFORM-ASSOCIATE-004 · Question #171
TERRAFORM-ASSOCIATE-004 Question #171: Real Exam Question with Answer & Explanation
The correct answer is D: Dynamic blocks. Dynamic blocks in Terraform allow you to define multiple nested blocks within a resource based on the values of a variable. This feature is particularly useful for scenarios where the number of nested blocks is not fixed and can change based on variable input.
Question
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?
Options
- ALocal values
- BCount arguments
- CCollection functions
- DDynamic blocks
Explanation
Dynamic blocks in Terraform allow you to define multiple nested blocks within a resource based on the values of a variable. This feature is particularly useful for scenarios where the number of nested blocks is not fixed and can change based on variable input.
Topics
Community Discussion
No community discussion yet for this question.