diff --git a/README.md b/README.md index 2b1c882..80c36f2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ --- -This Terraform module creates an encryption Lambda function that is triggered by a SNS notification on a successful AMI Packer build. +This Terraform module creates an encryption Lambda function that is triggered by a SNS notification on a successful AMI Packer build. The module also creates a cloudwatch event that monitors build events and passes them to ami encryption lambda function. The cloudwatch even target is set to the ami encryption lambda, in order to run on any successful build. This project is part of our open source DevOps adoption approach. diff --git a/aws_cloudwatch_event_rule_build_success.tf b/aws_cloudwatch_event_rule_build_success.tf index 78b23db..2c2103e 100644 --- a/aws_cloudwatch_event_rule_build_success.tf +++ b/aws_cloudwatch_event_rule_build_success.tf @@ -1,6 +1,5 @@ resource "aws_cloudwatch_event_rule" "build_alert" { - # Create cloudwatch event that monitors build events and passes them to ami encryption lambda function - name = "AMI-CODEBUILD-SUCESS-ALERT" + name = "${upper(var.environment)}-AMI-CODEBUILD-SUCESS-ALERT" description = "Send alerts to encrypt AMI on build success." event_pattern = <