Skip to content

Commit

Permalink
Fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
misraved committed Oct 22, 2024
1 parent 58defd2 commit f742c15
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions aws/table_aws_vpc_security_group_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,35 +257,6 @@ func getSecurityGroupRule(ctx context.Context, d *plugin.QueryData, h *plugin.Hy
return nil, nil
}

func getSecurityGroupDetails(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData) (interface{}, error) {

sgRule := h.Item.(types.SecurityGroupRule)

// Build the params
params := &ec2.DescribeSecurityGroupsInput{
GroupIds: []string{*sgRule.GroupId},
}

// get service
svc, err := EC2Client(ctx, d)
if err != nil {
plugin.Logger(ctx).Error("aws_vpc_security_group_rule.getSecurityGroupDetails", "connection_error", err)
return nil, err
}

op, err := svc.DescribeSecurityGroups(ctx, params)
if err != nil {
plugin.Logger(ctx).Error("aws_vpc_security_group_rule.getSecurityGroupDetails", "api_error", err)
return nil, err
}

if len(op.SecurityGroups) > 0 {
return op.SecurityGroups[0], nil
}

return nil, nil
}

func getReferencedSecurityGroupDetails(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData) (interface{}, error) {
sgRule := h.Item.(types.SecurityGroupRule)
if sgRule.ReferencedGroupInfo == nil {
Expand Down

0 comments on commit f742c15

Please sign in to comment.