diff --git a/providers/aws/resources/aws.lr b/providers/aws/resources/aws.lr index c4d483bd7c..55e6d35150 100644 --- a/providers/aws/resources/aws.lr +++ b/providers/aws/resources/aws.lr @@ -1438,6 +1438,8 @@ private aws.lambda.function @defaults("arn") { arn string // Name of the function name string + // Runtime environment for the function + runtime string // Concurrency limit for the function concurrency() int // Target ARN of the DeadLetterQueue config diff --git a/providers/aws/resources/aws.lr.go b/providers/aws/resources/aws.lr.go index a0d4d2d404..a83899cf30 100644 --- a/providers/aws/resources/aws.lr.go +++ b/providers/aws/resources/aws.lr.go @@ -2112,6 +2112,9 @@ var getDataFields = map[string]func(r plugin.Resource) *plugin.DataRes{ "aws.lambda.function.name": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsLambdaFunction).GetName()).ToDataRes(types.String) }, + "aws.lambda.function.runtime": func(r plugin.Resource) *plugin.DataRes { + return (r.(*mqlAwsLambdaFunction).GetRuntime()).ToDataRes(types.String) + }, "aws.lambda.function.concurrency": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsLambdaFunction).GetConcurrency()).ToDataRes(types.Int) }, @@ -5009,6 +5012,10 @@ var setDataFields = map[string]func(r plugin.Resource, v *llx.RawData) bool { r.(*mqlAwsLambdaFunction).Name, ok = plugin.RawToTValue[string](v.Value, v.Error) return }, + "aws.lambda.function.runtime": func(r plugin.Resource, v *llx.RawData) (ok bool) { + r.(*mqlAwsLambdaFunction).Runtime, ok = plugin.RawToTValue[string](v.Value, v.Error) + return + }, "aws.lambda.function.concurrency": func(r plugin.Resource, v *llx.RawData) (ok bool) { r.(*mqlAwsLambdaFunction).Concurrency, ok = plugin.RawToTValue[int64](v.Value, v.Error) return @@ -13560,6 +13567,7 @@ type mqlAwsLambdaFunction struct { // optional: if you define mqlAwsLambdaFunctionInternal it will be used here Arn plugin.TValue[string] Name plugin.TValue[string] + Runtime plugin.TValue[string] Concurrency plugin.TValue[int64] DlqTargetArn plugin.TValue[string] Policy plugin.TValue[interface{}] @@ -13613,6 +13621,10 @@ func (c *mqlAwsLambdaFunction) GetName() *plugin.TValue[string] { return &c.Name } +func (c *mqlAwsLambdaFunction) GetRuntime() *plugin.TValue[string] { + return &c.Runtime +} + func (c *mqlAwsLambdaFunction) GetConcurrency() *plugin.TValue[int64] { return plugin.GetOrCompute[int64](&c.Concurrency, func() (int64, error) { return c.concurrency() diff --git a/providers/aws/resources/aws.lr.manifest.yaml b/providers/aws/resources/aws.lr.manifest.yaml index 7bae316b04..7642e82a47 100755 --- a/providers/aws/resources/aws.lr.manifest.yaml +++ b/providers/aws/resources/aws.lr.manifest.yaml @@ -1109,6 +1109,7 @@ resources: name: {} policy: {} region: {} + runtime: {} tags: {} vpcConfig: {} is_private: true diff --git a/providers/aws/resources/aws_lambda.go b/providers/aws/resources/aws_lambda.go index 392c9f188b..e23c525da5 100644 --- a/providers/aws/resources/aws_lambda.go +++ b/providers/aws/resources/aws_lambda.go @@ -90,6 +90,7 @@ func (a *mqlAwsLambda) getFunctions(conn *connection.AwsConnection) []*jobpool.J map[string]*llx.RawData{ "arn": llx.StringData(convert.ToString(function.FunctionArn)), "name": llx.StringData(convert.ToString(function.FunctionName)), + "runtime": llx.StringData(string(function.Runtime)), "dlqTargetArn": llx.StringData(dlqTarget), "vpcConfig": llx.MapData(vpcConfigJson, types.Any), "region": llx.StringData(regionVal),