Skip to content

Walk expressions with expansion #340

Open
@wata727

Description

@wata727

See also terraform-linters/tflint-ruleset-terraform#199

The current WalkExpressions API cannot meet requirements such as terraform-linters/tflint-ruleset-terraform#199. This is because it is difficult to balance walking low-level expressions with values ​​being expanded at evaluation time. If we were to only look at the structure of the expression without evaluating it, walking the expression as many times as it was expanded would be redundant, but we would not be able to get all possible combinations of values ​​without doing so.

To solve this issue, we would need to introduce an API for each use case. For example, there is the WalkExpandedExpressions API, which expands expressions such as for expressions in advance and returns expressions with bound values.

This could be implemented as a host API, but more could also be implemented in the SDK by extending EvaluateExpr API to allow passing an arbitrary evaluation context.

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