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

Fix invalid memory address issue for arguments interface and Handle the error when the specified path is unavailable #56

Merged
merged 5 commits into from Sep 15, 2023

Conversation

bigdatasourav
Copy link
Contributor

@bigdatasourav bigdatasourav commented Sep 14, 2023

Integration test logs

Logs
Add passing integration test logs here

Example query results

Results
In a particular document, some property values can be null; like in the below document, tags and timeouts are null.

document:::: EXTRA_VALUE_AT_END="map[_kics_lines:map[_kics__default:map[_kics_line:21] _kics_description:map[_kics_line:22] _kics_ingress:map[_kics_arr:[map[_kics__default:map[_kics_line:25] _kics_cidr_blocks:map[_kics_arr:[map[_kics__default:map[_kics_line:26]]] _kics_line:25] _kics_description:map[_kics_line:28] _kics_from_port:map[_kics_line:29] _kics_ipv6_cidr_blocks:map[_kics_line:30] _kics_prefix_list_ids:map[_kics_line:33] _kics_protocol:map[_kics_line:36] _kics_security_groups:map[_kics_line:37] _kics_self:map[_kics_line:40] _kics_to_port:map[_kics_line:41]]] _kics_line:23] _kics_name:map[_kics_line:44] _kics_revoke_rules_on_delete:map[_kics_line:45] _kics_tags:map[_kics_line:46] _kics_timeouts:map[_kics_line:47]] description:Example Security Group ingress:[map[cidr_blocks:[0.0.0.0/0] description: from_port:22 ipv6_cidr_blocks:[] prefix_list_ids:[] protocol:tcp security_groups:[] self:false to_port:22]] name:example_sg revoke_rules_on_delete:false tags:<nil> timeouts:<nil>]"


> select name, type, mode, path from terraform_resource
+------------+--------------------+--------+-----------------------------------------------------------+
| name       | type               | mode   | path                                                      |
+------------+--------------------+--------+-----------------------------------------------------------+
| example_sg | aws_security_group | <null> | /Users/sourav/turbot/steampipe-plugin-terraform/plan.json |
+------------+--------------------+--------+-----------------------------------------------------------+

@bigdatasourav bigdatasourav changed the title Fix invalid memory address issue for arguments interface Fix invalid memory address issue for arguments interface and Handle the error when the specified path is unavailable Sep 14, 2023
@@ -79,6 +79,12 @@ func tfConfigList(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat
// List the files in the given source directory
files, err := d.GetSourceFiles(i)
if err != nil {
plugin.Logger(ctx).Error("tfConfigList.configurationFilePaths.GetSourceFiles", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
plugin.Logger(ctx).Error("tfConfigList.configurationFilePaths.GetSourceFiles", err)
plugin.Logger(ctx).Error("tfConfigList.configurationFilePaths", "get_source_files_error", err)

@cbruno10 cbruno10 merged commit c5c2c8f into main Sep 15, 2023
1 check passed
@cbruno10 cbruno10 deleted the issue-54 branch September 15, 2023 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants