Skip to content

Support expanding function arguments (fn([1,2,3]...) #1944

Open
@canidam

Description

@canidam

Language Server Version

v0.36.4

Problem Statement

I have a list variable I pass to a function, where I use expansion symbol (...) to pass items as separate parameters.

For example:

variable "private_cidr_newbits" {
  type        = list(number)
  default     = [3, 3, 3]
  description = "The newbits value passed to cidrsubnets function"
}

When I pass it to function such as cidrsubnets(var.cidr, var.private_cidr_newbits...)
I get this error:

Image

Using the variable without expansion elsewhere works fine. (passing it to a variable that is expected to be a list)

Attempted Solutions

No response

Proposal

No response

Related LSP methods

No response

References

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions