How to deploy newrelic-log-ingestion function via Terraform?

About AWS Lambda for sending CloudWatch logs.

This guide is showing how to install the newrelic-log-ingestion function in Lambda in AWS console. Then create a Lambda trigger to select which Log group in CloudWatch to use.
If we want to use Terraform to deploy the function, as we want to add the filter pattern:

From the guide:

Which provider should we use?

If use a customized function, it seems need to use the AWS provider and the aws_lambda_function resource:

I recommend using AWS as your provider for this.

1 Like