Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Issue querying ACK table when no tags set on cluster Closes #425 #426

Merged
merged 2 commits into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions alicloud/table_alicloud_cs_kubernetes_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,14 +504,12 @@ func getCsKubernetesClusterARN(ctx context.Context, d *plugin.QueryData, h *plug
//// TRANSFORM FUNCTIONS

func csKubernetesClusterAkaTagsToMap(_ context.Context, d *transform.TransformData) (interface{}, error) {
tags := d.Value.([]interface{})
if tags == nil {
if d.Value == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ParthaI if we are already checking d.Value == nil then I don't think we need the check mentioned in lines https://github.com/turbot/steampipe-plugin-alicloud/pull/426/files#diff-01756e1a7a77698610d809a8875a0ab69232965568f82bf94296fa5560ad9ce1L508-L514.

return nil, nil
}

tags := d.Value.([]interface{})

if len(tags) == 0 {
return nil, nil
}
turbotTagsMap := map[string]string{}
for _, i := range tags {
tagDetails := i.(map[string]interface{})
Expand Down
Loading