diff --git a/providers/aws/resources/aws.lr b/providers/aws/resources/aws.lr index 21c3adb03d..a260639e36 100644 --- a/providers/aws/resources/aws.lr +++ b/providers/aws/resources/aws.lr @@ -1520,6 +1520,8 @@ private aws.cloudtrail.trail @defaults("name region") { logGroup() aws.cloudwatch.loggroup // Role for logs endpoint to assume when writing to log group cloudWatchLogsRoleArn string + // Group for logs endpoint to assume when writing to log group + cloudWatchLogsLogGroupArn string // Settings for the trail's configured event selectors eventSelectors() []dict // Region in which the trail was created (home region) diff --git a/providers/aws/resources/aws.lr.go b/providers/aws/resources/aws.lr.go index ef86122385..27ca665121 100644 --- a/providers/aws/resources/aws.lr.go +++ b/providers/aws/resources/aws.lr.go @@ -2359,6 +2359,9 @@ var getDataFields = map[string]func(r plugin.Resource) *plugin.DataRes{ "aws.cloudtrail.trail.cloudWatchLogsRoleArn": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsCloudtrailTrail).GetCloudWatchLogsRoleArn()).ToDataRes(types.String) }, + "aws.cloudtrail.trail.cloudWatchLogsLogGroupArn": func(r plugin.Resource) *plugin.DataRes { + return (r.(*mqlAwsCloudtrailTrail).GetCloudWatchLogsLogGroupArn()).ToDataRes(types.String) + }, "aws.cloudtrail.trail.eventSelectors": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsCloudtrailTrail).GetEventSelectors()).ToDataRes(types.Array(types.Dict)) }, @@ -6242,6 +6245,10 @@ var setDataFields = map[string]func(r plugin.Resource, v *llx.RawData) bool { r.(*mqlAwsCloudtrailTrail).CloudWatchLogsRoleArn, ok = plugin.RawToTValue[string](v.Value, v.Error) return }, + "aws.cloudtrail.trail.cloudWatchLogsLogGroupArn": func(r plugin.Resource, v *llx.RawData) (ok bool) { + r.(*mqlAwsCloudtrailTrail).CloudWatchLogsLogGroupArn, ok = plugin.RawToTValue[string](v.Value, v.Error) + return + }, "aws.cloudtrail.trail.eventSelectors": func(r plugin.Resource, v *llx.RawData) (ok bool) { r.(*mqlAwsCloudtrailTrail).EventSelectors, ok = plugin.RawToTValue[[]interface{}](v.Value, v.Error) return @@ -16100,6 +16107,7 @@ type mqlAwsCloudtrailTrail struct { Status plugin.TValue[interface{}] LogGroup plugin.TValue[*mqlAwsCloudwatchLoggroup] CloudWatchLogsRoleArn plugin.TValue[string] + CloudWatchLogsLogGroupArn plugin.TValue[string] EventSelectors plugin.TValue[[]interface{}] Region plugin.TValue[string] } @@ -16227,6 +16235,10 @@ func (c *mqlAwsCloudtrailTrail) GetCloudWatchLogsRoleArn() *plugin.TValue[string return &c.CloudWatchLogsRoleArn } +func (c *mqlAwsCloudtrailTrail) GetCloudWatchLogsLogGroupArn() *plugin.TValue[string] { + return &c.CloudWatchLogsLogGroupArn +} + func (c *mqlAwsCloudtrailTrail) GetEventSelectors() *plugin.TValue[[]interface{}] { return plugin.GetOrCompute[[]interface{}](&c.EventSelectors, func() ([]interface{}, error) { return c.eventSelectors() diff --git a/providers/aws/resources/aws.lr.manifest.yaml b/providers/aws/resources/aws.lr.manifest.yaml index 384d209a31..93521ce2db 100755 --- a/providers/aws/resources/aws.lr.manifest.yaml +++ b/providers/aws/resources/aws.lr.manifest.yaml @@ -460,6 +460,7 @@ resources: status logGroup cloudWatchLogsRoleArn + cloudWatchLogsLogGroupArn eventSelectors region } @@ -474,6 +475,7 @@ resources: The `aws.cloudtrail.trail` object represents an individual AWS CloudTrail configured within an account. For usage, read the `aws.cloudtrail` resource documentation. fields: arn: {} + cloudWatchLogsLogGroupArn: {} cloudWatchLogsRoleArn: {} eventSelectors: {} includeGlobalServiceEvents: {} diff --git a/providers/aws/resources/aws_cloudtrail.go b/providers/aws/resources/aws_cloudtrail.go index ea3ca4bf0a..71f6257725 100644 --- a/providers/aws/resources/aws_cloudtrail.go +++ b/providers/aws/resources/aws_cloudtrail.go @@ -131,6 +131,7 @@ func (a *mqlAwsCloudtrail) getTrails(conn *connection.AwsConnection) []*jobpool. "includeGlobalServiceEvents": llx.BoolDataPtr(trail.IncludeGlobalServiceEvents), "snsTopicARN": llx.StringDataPtr(trail.SnsTopicARN), "cloudWatchLogsRoleArn": llx.StringDataPtr(trail.CloudWatchLogsRoleArn), + "cloudWatchLogsLogGroupArn": llx.StringDataPtr(trail.CloudWatchLogsLogGroupArn), "region": llx.StringDataPtr(trail.HomeRegion), }