Skip to content

Latest commit

 

History

History
64 lines (47 loc) · 4.68 KB

README.md

File metadata and controls

64 lines (47 loc) · 4.68 KB

New Relic log ingestion module

This is a modified version of the Terraform module provided at https://github.com/newrelic/aws-log-ingestion.

This version builds the log ingestor lambda without using Docker; the original version uses Docker in host network mode, which isn't supported by BitBuket's CI pipelines.
Instead this uses pipenv to build the lambda directly on the host.

The Terraform will provision the lambda and associated resources. To forward logs to New Relic you'll need to add triggers to the lambda using CloudWatch log groups as the source event.

Requirements

pipenv installed locally

Providers

Name Version
aws n/a
null n/a

Modules

No modules.

Resources

Name Type
aws_cloudwatch_log_group.lambda_logs resource
aws_iam_role.lambda_role resource
aws_iam_role_policy_attachment.lambda_log_policy resource
aws_lambda_function.ingestion_function resource
aws_lambda_permission.log_invoke_permission resource
null_resource.build_lambda resource
aws_caller_identity.current data source
aws_iam_policy_document.lambda_assume_policy data source
aws_partition.current data source
aws_region.current data source

Inputs

Name Description Type Default Required
function_role IAM Role name that this function will assume. Should provide the AWSLambdaBasicExecutionRole policy. If not specified, an appropriate Role will be created. string null no
lambda_log_retention_in_days Number of days to keep logs from the lambda for number 7 no
memory_size Memory size for the New Relic Log Ingestion Lambda function number 128 no
nr_infra_logging Determines if logs are forwarded to New Relic Infrastructure bool true no
nr_license_key Your NewRelic license key. string n/a yes
nr_logging_enabled Determines if logs are forwarded to New Relic Logging bool false no
nr_tags Additional tags added to the logs string n/a yes
permissions_boundary IAM Role Permissions Boundary (optional) string null no
python_runtime_version The lambda Python runtime version string "3.9" no
service_name The name of the lambda function and related resources string "newrelic-log-ingestion" no
tags Tags to add to the resources created map(string) {} no
timeout Timeout for the New Relic Log Ingestion Lambda function number 30 no

Outputs

Name Description
function_arn Log ingestion lambda function ARN
function_name Log ingestion lambda function name