Skip to content

Commit

Permalink
🐛 fix aws cloudtrail init function when no args where provided (#3268)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock authored Feb 12, 2024
1 parent b4c54b1 commit 9e939d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions providers/aws/resources/aws_cloudtrail.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ func initAwsCloudtrailTrail(runtime *plugin.Runtime, args map[string]*llx.RawDat
nameVal := args["name"].Value.(string)
arn = fmt.Sprintf(s3ArnPattern, nameVal)
}

if arn == "" {
return nil, nil, errors.New("arn or name required to fetch aws cloudtrail trail")
}

log.Debug().Str("arn", arn).Msg("init cloudtrail trail with arn")

// load all s3 buckets
Expand Down

0 comments on commit 9e939d8

Please sign in to comment.