How to send AWS CloudWatch logs to New Relic via AWS Lambda?

I’m using this repository to create a lambda function for AWS logging integration:

If use Terraform deploy it, here I can find it can read all CloudWatch logs:

But in the AWS Lambda for sending CloudWatch logs article, there is a description as

Once the process completes, create a Lambda trigger to link your Lambda function to CloudWatch logs.

If so, then it seems need to create a cloudwatch event trigger for a special log group:

Create a Lambda trigger

But how to create the trigger by Terraform? Is it really necessary if I want to send all the log groups?