Introduction
Sometimes you need to organize related pieces of information together in your infrastructure code. Complex types let you group values like lists and maps so you can manage them clearly and avoid mistakes.
When you want to pass multiple related settings as one unit to a module.
When you need to store a list of servers with their IP addresses and roles.
When you want to create a map of environment variables for an application.
When you want to avoid repeating the same values in many places by grouping them.
When you want to validate that your input data has the right structure before applying changes.