From 45318d0b7096e6d1c037e02aba35ce463343022d Mon Sep 17 00:00:00 2001 From: Irving Popovetsky Date: Mon, 29 Jan 2018 15:27:31 -0800 Subject: [PATCH] Adding SNS notifications for RDS and AutoScalingGroup Signed-off-by: Irving Popovetsky --- backendless_chef.yaml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/backendless_chef.yaml b/backendless_chef.yaml index 0b26322..c404c16 100644 --- a/backendless_chef.yaml +++ b/backendless_chef.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: '2010-09-09' -Description: AWS Native Chef Server v3.2.0 +Description: AWS Native Chef Server v3.3.0 Parameters: # Required Parameters @@ -299,6 +299,13 @@ Resources: - !Ref ChefPJELB MaxSize: '1' MinSize: '1' + NotificationConfigurations: + - TopicARN: !Ref AlertNotificationTopic + NotificationTypes: + - autoscaling:EC2_INSTANCE_LAUNCH + - autoscaling:EC2_INSTANCE_LAUNCH_ERROR + - autoscaling:EC2_INSTANCE_TERMINATE + - autoscaling:EC2_INSTANCE_TERMINATE_ERROR Tags: - Key: Name Value: !Sub ${AWS::StackName}-bootstrap-frontend @@ -323,6 +330,13 @@ Resources: - !Ref ChefTargetGroup MaxSize: !Sub '${MaxFrontendInstances}' MinSize: !Sub '${MinFrontendInstances}' + NotificationConfigurations: + - TopicARN: !Ref AlertNotificationTopic + NotificationTypes: + - autoscaling:EC2_INSTANCE_LAUNCH + - autoscaling:EC2_INSTANCE_LAUNCH_ERROR + - autoscaling:EC2_INSTANCE_TERMINATE + - autoscaling:EC2_INSTANCE_TERMINATE_ERROR Tags: - Key: Name Value: !Sub ${AWS::StackName}-frontend @@ -965,6 +979,14 @@ Resources: - Key: X-Contact Value: !Ref ContactEmail + RdsEventSubscription: + Type: AWS::RDS::EventSubscription + Properties: + SnsTopicArn: !Ref AlertNotificationTopic + SourceIds: + - !Ref DBPostgres + SourceType: db-instance + # ElasticSearch ######################################################################################### ESSecurityGroup: