diff --git a/examples/aws-cloudwatch-events/kinesis/README.md b/examples/aws-cloudwatch-events/kinesis/README.md new file mode 100644 index 000000000..2dcb829cc --- /dev/null +++ b/examples/aws-cloudwatch-events/kinesis/README.md @@ -0,0 +1,14 @@ +# CloudWatch Event sent to Kinesis Stream + +This example sets up a CloudWatch Event Rule with a Target and IAM Role & Policy +to send all autoscaling events into Kinesis stream for further examination. + +See more details about [CloudWatch Events](http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/WhatIsCloudWatchEvents.html) +in the official AWS docs. + +## How to run the example + +``` +terraform apply \ + -var=aws_region=us-west-2 +``` diff --git a/examples/aws-cloudwatch-events/kinesis/main.tf b/examples/aws-cloudwatch-events/kinesis/main.tf new file mode 100644 index 000000000..0e7a22052 --- /dev/null +++ b/examples/aws-cloudwatch-events/kinesis/main.tf @@ -0,0 +1,72 @@ +provider "aws" { + region = "${var.aws_region}" +} + +resource "aws_cloudwatch_event_rule" "foo" { + name = "${var.rule_name}" + event_pattern = <