Skip to content

Errors being thrown for tuples #53

Description

Describe the Bug

I am trying to merge two maps containing tuples and am getting errors like this:

│ Error: Invalid function argument
│ 
│   on depth.tf line 83, in locals:
│   83:           for key in keys(item["value"]) :
│     ├────────────────
│     │ item["value"] is tuple with 14 elements
│ 
│ Invalid value for "inputMap" parameter: must have map or object type.

This is because all of the functions in the try( are returning null. Tuple cannot be converted to list.

try(tolist(item["value"][key]), toset(item["value"][key]), tonumber(item["value"][key]), tobool(item["value"][key]), tostring(item["value"][key]), null)

Expected Behavior

Tuples are considered 'final' in the 'depth'.

Steps to Reproduce

Include a tuple in the maps

maps = [{ something = "Yes", num = 2 }, { else = "No", bits = [1, 2, 3] }]

Screenshots

No response

Environment

No response

Additional Context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug🐛 An issue with the system

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions