• Martin Atkins's avatar
    Experimenting with more details for unknown for_each error · acd2ff67
    Martin Atkins authored
    This was an attempt to try to report more context in an unknown for_each
    error by dragging unknown value origin information through the normal
    expression evaluation process using cty marks.
    
    However, it doesn't actually work because Terraform evaluates each
    expression separately in its own evaluation context, and so this trick
    of sneakily re-evaluating an expression with marks only when we hit an
    error can only ever find shallow references, which we can already find
    statically anyway.
    
    I'm just pushing this up to keep it for a possible second attempt later.
    I think a second attempt would need something more like the analyzer
    I built in #28944, but using marks and expression evaluation to deal with
    its analyses instead of the custom static technique I tried there.
    acd2ff67
Analyzing file…