From 586d5e774eeb1a3700d26c6fe2c2fc4b65e523e2 Mon Sep 17 00:00:00 2001 From: MalikRajeshwari <113170170+MalikRajeshwari@users.noreply.github.com> Date: Thu, 27 Oct 2022 15:54:02 +0530 Subject: [PATCH] commitPR22 --- base/PRcheck22 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 base/PRcheck22 diff --git a/base/PRcheck22 b/base/PRcheck22 new file mode 100644 index 0000000..3f17515 --- /dev/null +++ b/base/PRcheck22 @@ -0,0 +1,46 @@ +AWSTemplateFormatVersion: "2010-09-09" +Description: "Example containing topic and an attached queue" +Parameters: + topicDisplayName: + Type: String + Description: "display name for the SNS topic" + +Resources: + topic: + Type: "AWS::SNS::Topic" + Properties: + DisplayName: "|Ref|topicDisplayName" + Subscription: + - Endpoint: "|GetAtt|queue|Arn" + Protocol: sqs + + queue: + Type: "AWS::SQS::Queue" + + schedulingQueuePolicy: + Type: "AWS::SQS::QueuePolicy" + Properties: + Queues: + - "|Ref|queue" + PolicyDocument: + Statement: + - Action: SQS:SendMessage + Condition: + ArnEquals: + aws:SourceArn: "|Ref|topic" + Effect: Allow + Principal: + AWS: "*" + Resource: "|GetAtt|queue|Arn" + Version: "2012-10-17" + +Outputs: + topicArn: + Description: "ARN of the topic" + Value: "|Ref|topic" + queueName: + Description: "Name of the queue" + Value: "|GetAtt|queue|QueueName" + queueArn: + Description: "ARN of the queue" + Value: "|GetAtt|queue|Arn"