Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
Rename column grant_id to id in turbot_grant table closes #32 (#33
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ParthaI authored Jan 26, 2022
1 parent 94838cb commit 3b2fc5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions turbot/table_turbot_grant.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ func tableTurbotGrant(ctx context.Context) *plugin.Table {
Description: "All grants of resources by Turbot.",
List: &plugin.ListConfig{
KeyColumns: []*plugin.KeyColumn{
{Name: "grant_id", Require: plugin.Optional},
{Name: "id", Require: plugin.Optional},
},
Hydrate: listGrants,
},
Columns: []*plugin.Column{
// Top columns
{Name: "grant_id", Type: proto.ColumnType_INT, Transform: transform.FromField("Turbot.ID"), Description: "Unique identifier of the grant."},
{Name: "id", Type: proto.ColumnType_INT, Transform: transform.FromField("Turbot.ID"), Description: "Unique identifier of the grant."},
{Name: "resource_id", Type: proto.ColumnType_INT, Transform: transform.FromField("Resource.Turbot.ID"), Description: "Unique identifier of the resource."},
{Name: "identity_status", Type: proto.ColumnType_STRING, Transform: transform.FromField("Identity.Status"), Description: "Status of the identity."},
{Name: "identity_display_name", Type: proto.ColumnType_STRING, Transform: transform.FromField("Identity.DisplayName"), Description: "Display name of the identity."},
Expand Down Expand Up @@ -131,7 +131,7 @@ func listGrants(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData)
}

// Additional filters
if quals["grant_id"] != nil {
if quals["id"] != nil {
filters = append(filters, fmt.Sprintf("id:%s", getQualListValues(ctx, quals, "id", "int64")))
}

Expand Down

0 comments on commit 3b2fc5b

Please sign in to comment.