Code Monkey home page Code Monkey logo

terraform-aws-cloudwatch's Introduction

Terraform module for creating CloudWatch logging templates.

This module creates optional a log_group and for that log_group cloud init scripts.

Usage

Example usages

module "cloudwatch" {
  source = "philips-software/cloudwatch/aws"
  version = "1.0.0"

  # Or via github
  # source = "github.com/philips-software/terraform-aws-cloudwatch?ref=1.0.0"

  environment = "${var.environment}"
  name_suffix = "ecs"

  #optional
  create_log_group = true
}

# Assemble cloud init config.
data "template_cloudinit_config" "config" {

  part {
    content_type = "${module.cloudwatch.amazon_linux_cloudinit_ecs_part["content_type"]}"
    content      = "${module.cloudwatch.amazon_linux_cloudinit_ecs_part["content"]}"
  }

  part {
    content_type = "${module.cloudwatch.amazon_linux_cloudinit_ecs_upstart_part["content_type"]}"
    content      = "${module.cloudwatch.amazon_linux_cloudinit_ecs_upstart_part["content"]}"
  }

  ... some other parts ...
  part {
    ...
  }
  ... some other parts ...

}

Inputs

Name Description Type Default Required
create_log_group Indicates if the log group needs to be created by the module. string true no
environment Logical name of the environment, will be used as prefix and for tagging. string - yes
name_suffix Logical name to append to the log group name. string - yes
tags A map of tags to add to the resources map <map> no

Outputs

Name Description
amazon_linux_cloudinit_ec2_part Cloud init part to install awslogs and configure logging for EC2.
amazon_linux_cloudinit_ecs_part Cloud init part to install awslogs and configure logging for ECS.
amazon_linux_cloudinit_ecs_upstart_part Cloud init part to update the upstart job to be aware of the ECS cluster.
log_group_arn Arn of the created log group. If not created an empty string is returned.
log_group_name Name of the created log group. If not created an empty string is returned.

Philips Forest

This module is part of the Philips Forest.

                                                     ___                   _
                                                    / __\__  _ __ ___  ___| |_
                                                   / _\/ _ \| '__/ _ \/ __| __|
                                                  / / | (_) | | |  __/\__ \ |_
                                                  \/   \___/|_|  \___||___/\__|  

                                                                 Infrastructure

Talk to the forestkeepers in the forest-channel on Slack.

Slack

terraform-aws-cloudwatch's People

Contributors

npalm avatar mpas avatar jeroenknoops avatar

Watchers

James Cloos 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.