Skip to content

Terraform module designed to forward AWS Cloudwatch Logs to LogDNA.

License

Notifications You must be signed in to change notification settings

cloud-legends/terraform-aws-logdna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kabisa logo

terraform-aws-logdna

Build Status Latest Release Terraform version Slack Community License

Terraform module designed to forward AWS Cloudwatch Logs to LogDNA. The module subscribes to a Cloudwatch Logs Group. A Lambda function then forwards the logs to LogDNA.

  It's 100% Open Source and licensed under the MIT license.

Usage

This project is available on the Terraform Registry

Include this module in your existing terraform code:

module "logdna" {
  source  = "kabisa/logdna/aws"
  #Use the latest version from the Terraform Registry
  version = "0.0.0"

  filter_pattern                    = "[host, ident, authuser, date, request, status, bytes]"
  environment                       = "acceptance"
  log_group_name                    = "name-of-cloudwatch-log-group"
  log_subscription_filter_name      = "name-of-cloudwatch-subscription-filter"
  lambda_execute_role_name          = "lambda-execute-stream-role"
  log_dna_key                       = "${var.log_dna_key}"
  log_group_arn                     = "arn-of-log-group"
  region                            = "eu-west-1"
  log_subscription_filter           = "logdna-cloudwatch"
  application_name                  = "testapp"
}

Inputs

Name Description Type Default Required
filter_pattern A valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. string [host, ident, authuser, date, request, status, bytes] no
environment The name of the current environment. (e.g acceptence, production) string - yes
log_group_name The name of the log group to associate the subscription filter with. string - yes
lambda_execute_role_name The name of the execution IAM role. string - yes
log_dna_key LogDNA Ingestion Key. string - yes
log_group_arn The ARN of the Cloudwatch Log Group for which to forward logs for. string - yes
region The region in which the Cloudwatch Log Group is provisioned. string - yes
log_subscription_filter The name for the Cloudwatch Log subscription filter. string - yes

Outputs

None

Share the Love

Like this project? Please give it a ★ on our GitHub! (it helps us a lot)

Are you using this project or any of our other projects? Consider sharing this project:

Help

Got a question?

File a GitHub issue, or send us an email.

Support

At Kabisa we believe in the power of AWS in combination with Infrastructure as Code. Our DevOps Engineers are AWS certified and as a result of our expertise and experience we are official AWS partner Standard.

Struggling with Terraform our just need an extra hand? Contact us at:

E-Mail

Contributing

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or file feature requests.

Developing

If you are interested in being a contributor and want to get involved in developing this project or help out with our other projects, we would love to hear from you! Shoot us an email.

In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull Request so that we can review your changes

NOTE: Be sure to merge the latest changes from "upstream" before making a pull request!

Copyright

Copyright © 2022 Kabisa B.V

License

License

See LICENSE for full details.

Trademarks

All other trademarks referenced herein are the property of their respective owners.

About

This project is maintained and funded by Kabisa B.V. Like it? Please let us know by leaving a comment!

Kabisa logo