GithubHelp home page GithubHelp logo

isabella232 / terraform-aws-honeycomb-cloudwatch-metric-stream Goto Github PK

View Code? Open in Web Editor NEW

This project forked from honeycombio/terraform-aws-honeycomb-cloudwatch-metric-stream

0.0 0.0 0.0 52 KB

Terraform module to send a CloudWatch Metric Stream to https://honeycomb.io.

License: Other

Shell 23.78% HCL 76.22%

terraform-aws-honeycomb-cloudwatch-metric-stream's Introduction

Terraform AWS-Honeycomb CloudWatch Metrics Stream module

This module creates resources to send your CloudWatch Metrics to Honeycomb.

Use

The minimal config is:

module "my-cloudwatch-metrics" {
  source = "honeycombio/honeycomb-cloudwatch-metric-stream/aws"

  name = "my-cloudwatch-metrics"
  honeycomb_dataset_name = "my-cloudwatch-metrics"
  honeycomb_api_key = var.honeycomb_api_key
}

You can load terraform variables from the system by ensuring the environment variable TF_VAR_honeycomb_api_key is exported on the system.

export TF_VAR_honeycomb_api_key=$HONEYCOMB_API_KEY

Additionally, in variables.tf you can include an empty placeholder to the variable.

variable "honeycomb_api_key" {}

Now when you run terraform plan/apply you will not be prompted for your API key during the sequence.

For more config options, including resource tagging and namespace include/exclude filters, see USAGE.md.

Examples

Examples of use of this module can be found in examples/. We've provided a default example ("send all metrics") and examples using the namespace_include_filters and namespace_exclude_filters (which are mutually exclusive). We've also provided an example of tagging your resources.

Development

Tests

Test cases are in tests/. To setup:

  1. Edit the provider "aws" block to fit your credentials.

  2. Create a test.auto.tfvars file in tests/ with values for honeycomb_api_key and, optionally, honeycomb_api_host.

  3. terraform plan and terraform apply will now work as expected, as will terraform destroy.

  4. There's a small Bats that validates a few test cases, one for each of the examples/. To run it, bats test.bats inside tests/. It does not run terraform apply for you, you have to do that first. See test.bats for more documentation. (Feel free to add more test cases.)

Docs

Docs are autogenerated via ./docs.sh, and put in USAGE.md. Please regenerate and commit before merging. (Consider automating this with a github action - see comments in that file for what's not yet working.

Lints

We use tflint and terraform fmt, and enforce this with a github action.

Contributions

Features, bug fixes and other changes to this module are gladly accepted. Please open issues or a pull request with your change.

All contributions will be released under the Apache License 2.0.

terraform-aws-honeycomb-cloudwatch-metric-stream's People

Contributors

ismith avatar reulan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.