This module creates a Lambda function that forwards logs to Guance Cloud.
See example files for example usage.
Name | Version |
---|---|
terraform | >= 1.0 |
aws | >= 4.9 |
Name | Version |
---|---|
archive | n/a |
aws | >= 4.9 |
No modules.
Name | Type |
---|---|
aws_iam_policy.lambda_logging | resource |
aws_iam_role.lambda_role | resource |
aws_iam_role_policy_attachment.lambda_logs | resource |
aws_lambda_function.lambda | resource |
aws_lambda_permission.cloudwatch | resource |
aws_lambda_permission.lambda | resource |
archive_file.lambda | data source |
aws_iam_policy_document.lambda_logging | data source |
aws_region.current | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cloudwatch_events_enabled | Enable CloudWatch events | bool |
false |
no |
cloudwatch_events_rule_arn | CloudWatch event rule arn | string |
"" |
no |
cloudwatch_logs_enabled | Enable CloudWatch logs | bool |
false |
no |
cloudwatch_logs_log_group_arn | CloudWatch log group arn | string |
"" |
no |
environment_variables | A map of environment variables for the lambda function | map(string) |
{} |
no |
function_name | The name for the Lambda function | string |
n/a | yes |
guance_endpoint | Guance endpoint for upload data, such as: datakit-hostname:9529 | string |
n/a | yes |
layers | List of Lambda Layer Version ARNs (maximum of 5) to attach to the forwarder lambda | list(string) |
[] |
no |
memory_size | The amount of memory in MB allocated to the Lambda function | number |
128 |
no |
publish | Whether to publish creation/change as a new Lambda Function Version | bool |
false |
no |
tags | A mapping of tags to assign to the lambda function | map(string) |
{} |
no |
timeout | The amount of time in seconds that Lambda allows a function to run before stopping it | number |
10 |
no |
Name | Description |
---|---|
lambda_arn | The ARN of the forwarder lambda function |
lambda_qualified_arn | The ARN of the forwarder lambda function (if versioning is enabled via publish = true) |
lambda_source_code_hash | Base64-encoded representation of raw SHA-256 sum of the zip file |
lambda_version | Latest published version of the forwarder lambda function |
role_arn | The forwarder lambda role arn |
role_id | The forwarder lambda role id |
role_name | The forwarder lambda role name |