Lambda datasource that returns multiple functions and allows filters #17701
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
new-data-source
Introduces a new data source.
service/cloudwatch
Issues and PRs that pertain to the cloudwatch service.
service/lambda
Issues and PRs that pertain to the lambda service.
Milestone
Community Note
Description
At the moment, for AWS Lambda, there only appears to be a "aws_lambda_function" datasource that returns a single function and that you have to know the name of the function for:
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/lambda_function
This issue is a proposal is for a new "aws_lambda_functions" datasource that returns zero or more lambda functions based on a filter, like the "aws_instances" datasource (https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/instances) but for Lambda functions.
Why?
I would like to use this datasource to feed it into a CloudWatch alarms resources and create an "alarm per function" to make it simpler to diagnose issues (in the current state, we have alarms which trigger if any lambda throws an error, which leaves the task of figuring out which Lambda it was to the unfortunate operator).
There are possible other use cases, basically any situation where you need a list of Lambda functions to create a "per function" resource as an example
New or Affected Resource(s)
Potential Terraform Configuration
References
N/A
The text was updated successfully, but these errors were encountered: