Skip to content

Add resource address to the result #261

@refeed

Description

@refeed

Is your feature request related to a problem? Please describe.
Currently, when we do evaluations, Tirith is only printing the actual and expected value without any context (see image below)
Image

This is confusing for the user as they don't know which resource and tags is affected.

The image that I use there uses terraform_plan provider, but this has to be done for other providers as well, e.g. JSON provider, Kubernetes, etc.

Describe the solution you'd like
In JSON, we should have a new key to contain the resource address, e.g.

      {
         "id": "check2",
         "passed": false,
         "result": [
            {
               "passed": false,
               "message": "`null` is not equal to `{}`",
               "address": "aws_vpc.this[0].instance_tenancy.0.something",

The address key will have to contain the full adress of where the value was found.

In Text format, we should print the resource address, e.g

Check: check1
  PASSED
    1. PASSED: `"default"` is equal to `"default"` - (Address: `aws_vpc.this[0].instance_tenancy.0.something`)
    2. PASSED: `"default"` is equal to `"default"` - (Address: `aws_vpc.this[0].instance_tenancy.0.something`)

Metadata

Metadata

Assignees

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