Coder Social home page Coder Social logo

terraform-cloudtrail-cloudwatch-sns's Introduction

AWS CloudTrail - CloudWatch - SNS Terraform module

A Terraform module that creates a multi-regional Trail, connects it with a CloudWatch Log Group, and creates a number of metric filters and metric alerts to receive SNS notifications for the following actions:

  • Root login
  • Console login without MFA
  • Action without MFA
  • Illegal use of a KMS key
  • Use of a KMS Key to decrypt
  • Changes in security groups
  • Changes in IAM
  • Changes in route tables
  • Changes in NACL

Here is a simplified diagram of the infrastructure:

Diagram

Terraform versions

The module has been tested using Terraform 0.12.

Usage

module "security_alerts" {
  source = "github.com/menendezjaume/terraform-cloudtrail-cloudwatch-sns"

  s3_bucket_name  = "my-bucket-name"
  namespace       = "my-namespace"
  cloudtrail_name = "my-cloudtrail-names"
}

Inputs

Name Description Type Default Required
cloudtrail_name Name of the cloudtrail to be created. string n/a yes
s3_bucket_name Name of the S3 Bucket to be created. string n/a yes
namespace The namespace for the module to use. string n/a yes
prefix Prefix to use for the cloudtrail logs. string "" no
retention_in_days The number of days log events are retained in the log group to be created. number 30 no
tags Tags. map Environment = "Terraform" no

Outputs

Name Description
sns_arn The Amazon Resource Name (ARN) for the SNS topic Security Alerts created
sns_subscription_page The AWS Subscription Page for the SNS topic Security Alerts created

Authors

Currently maintained by @menendezjaume. See menendezjaume.com for more information.

License

Apache 2 Licensed. See LICENSE for full details.

terraform-cloudtrail-cloudwatch-sns's People

Contributors

menendezjaume avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.