Skip to content

Produce more detailed diagnostics from failing test conditions #34428

@jbardin

Description

@jbardin

Terraform Version

v1.6

Use Cases

The run condition expressions used in tests are going to primarily rely on equality for comparisons, and usually only between 2 values. When the values consist of complex types, the error diagnostics attempt to simplify the output by summarizing the references in the expression, like is object with 4 attributes, or is tuple with 3 elements. This summary doesn't usually help in the context of a test failure, since the types should be known, and the user is concerned with why the exact values in the expression aren't matching.

Attempted Solutions

It is possible to break down the expression into multiple assertions, but it would be convenient to enable direct comparison of more complex objects.

Proposal

Extend the diagnostic format for test failures, which can print complete values or even create smart diffs based on those values in the UI.

References

#34425

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions