• Alisdair McDiarmid's avatar
    command/jsonplan: Fix sensitive/unknown crash · ff32fab4
    Alisdair McDiarmid authored
    When rendering the JSON plan sensitivity output, if the plan contained
    unknown collection or structural types, Terraform would crash. We need
    to detect unknown values before attempting to iterate them.
    
    Unknown collection or structural values cannot have sensitive contents
    accidentally displayed, as those values are not known until after apply.
    As a result we return an empty value of the appropriate type for the
    sensitivity mapping.
    ff32fab4