Why is `type = any` discouraged?
IntermediateConceptVariables, Locals, Outputs and Types
Answer
It disables validation and defers type errors until the value is used, often with confusing messages deep inside a resource. Terraform also infers one concrete type from the value passed, which can change behaviour between callers. Use precise object and map types in module interfaces.
More on Variables, Locals, Outputs and Types
How do you declare an input variable?BeginnerIn what order does Terraform load variable values?BeginnerHow do you define an output and what is it for?BeginnerWhat is the difference between locals and variables?BeginnerWhat are the primitive types in Terraform?BeginnerHow do list, set and map differ?Intermediate