Terraform Module Error: Unsupported attribute

Hi @100sun,

It’s hard to determine exactly what the problem may be without the variable type declaration, but I’m guessing there is no defined type for statements, in which case it could be various shapes of objects or maps depending on the values passed in. If this is the case, then the try function would need to be used when you cannot tell what attributes the objects will have.

You may want to consider refining the variable type to be more explicit, so that it’s easier to work with complex types like this without the need for dynamic lookups and the greater possibility of errors. If optional attributes and defaults are a problem for the type declaration, the next v1.3 release will contain a new optional attributes system for modules which you can see discussion about here: Request for Feedback: Optional object type attributes with defaults in v1.3 alpha

Thanks!