cfn-bridge 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloud_formation/bridge/request.rb +1 -1
- data/lib/cloud_formation/bridge/resources/subscribe_queue_to_topic.rb +5 -0
- data/lib/cloud_formation/bridge/version.rb +1 -1
- data/spec/files/sample-create-message.json +3 -3
- data/spec/files/sample-delete-message.json +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb117f078381ae0cb260bfee9b04ea821b312091
|
4
|
+
data.tar.gz: ee0d543be32bf3ac7785b40dd1f2a1700afae8f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d95bf99fc45343d58c6ef18dc83e029d4c6af4b24119cf503694aa7c579a87b29aceccd51629f7ff5a5fec3ec5086ad921d969f9cd6e870e670974ea5556f81c
|
7
|
+
data.tar.gz: a8e052cf554b8c41dc73c298e8f90585371e29e6afb0b0cd564d1775597b3c41d6400d1594a874494b86750870f408fcbe80ee65e0bff2fa3e6ed95abdecf331
|
@@ -14,6 +14,7 @@ module CloudFormation
|
|
14
14
|
|
15
15
|
TOPIC_ARN = 'TopicArn'
|
16
16
|
QUEUE_NAME = 'QueueName'
|
17
|
+
RAW_MESSAGE_DELIVERY = 'RawMessageDelivery'
|
17
18
|
|
18
19
|
REQUIRED_FIELDS = [
|
19
20
|
TOPIC_ARN,
|
@@ -28,6 +29,10 @@ module CloudFormation
|
|
28
29
|
|
29
30
|
subscription = topic.subscribe(queue)
|
30
31
|
|
32
|
+
if request.resource_properties[RAW_MESSAGE_DELIVERY]
|
33
|
+
subscription.raw_message_delivery = true
|
34
|
+
end
|
35
|
+
|
31
36
|
{
|
32
37
|
FIELDS::PHYSICAL_RESOURCE_ID => subscription.arn,
|
33
38
|
FIELDS::DATA => {
|
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"Type" : "Notification",
|
3
3
|
"MessageId" : "2c954555-19cd-58b9-9461-0909bad60c89",
|
4
|
-
"TopicArn" : "arn:aws:sns:us-east-1:
|
4
|
+
"TopicArn" : "arn:aws:sns:us-east-1:123456789012:test-custom-b2bea71b-e1b8-4b8f-9855-1c92e1f0cd11-CustomResourcesTopic-1E5ZVSSFPY65Z",
|
5
5
|
"Subject" : "AWS CloudFormation custom resource request",
|
6
|
-
"Message" : "{\"RequestType\":\"Create\",\"TopicArn\":\"arn:aws:sns:us-east-1:
|
6
|
+
"Message" : "{\"RequestType\":\"Create\",\"TopicArn\":\"arn:aws:sns:us-east-1:123456789012:test-custom-b2bea71b-e1b8-4b8f-9855-1c92e1f0cd11-CustomResourcesTopic-1E5ZVSSFPY65Z\",\"ResponseURL\":\"https://cloudformation-custom-resource-response-useast1.s3.amazonaws.com/arn%3Aaws%3Acloudformation%3Aus-east-1%3A123456789012%3Astack/test-custom-11fa3098-9e58-4fb4-8af3-63e29a8fa4aa/4d120bd0-1db2-11e4-a357-500162a66ca8%7COutputsResource%7C51e2334b-ace8-4b52-bf7d-3c9f88610c20?AWSAccessKeyId=AKIAJNXHFR7P7YGKLDPQ&Expires=1407368443&Signature=LW%2BCCq8ypCC4qWVy2wdOFx6CTyA%3D\",\"StackId\":\"arn:aws:cloudformation:us-east-1:123456789012:stack/test-custom-11fa3098-9e58-4fb4-8af3-63e29a8fa4aa/4d120bd0-1db2-11e4-a357-500162a66ca8\",\"RequestId\":\"51e2334b-ace8-4b52-bf7d-3c9f88610c20\",\"LogicalResourceId\":\"OutputsResource\",\"ResourceType\":\"Custom::CloudFormationOutputs\",\"ResourceProperties\":{\"Name\":\"test-custom-b2bea71b-e1b8-4b8f-9855-1c92e1f0cd11\",\"ServiceToken\":\"arn:aws:sns:us-east-1:123456789012:test-custom-b2bea71b-e1b8-4b8f-9855-1c92e1f0cd11-CustomResourcesTopic-1E5ZVSSFPY65Z\"}}",
|
7
7
|
"Timestamp" : "2014-08-06T21:40:43.535Z",
|
8
8
|
"SignatureVersion" : "1",
|
9
9
|
"Signature" : "KSCvlwOejMvy61BVOfmbHqF3LCab0wpnuwlWLXUPXNl8tBjd8j1lHaFdtLzIB7B0jj+t6uvDHA/AM03TmNYuM9wXUO2A71oqls2PWIdchjoW/dCrjvdE0ztqmMLaMG87VqvrZVnIDYKQpZugl5a4AshKEPx2WcEUiLxMi9gjE5L0GpmEG7qE9xyJH7KMQemCAUcNOWAK1Y6LWRGybVICslEACn8NYJc92akDN6im7b9w+i71DJC7dFDEgC/3y7YeGCFsq9I/MQXv71JrWMaJxHfp+LOXP6ucISKBMfJYpBpB4GsVuB0jW/cELkPqFyb2WVvHxWiWm1wvh2K/Vuo74Q==",
|
10
10
|
"SigningCertURL" : "https://sns.us-east-1.amazonaws.com/SimpleNotificationService-e372f8ca30337fdb084e8ac449342c77.pem",
|
11
|
-
"UnsubscribeURL" : "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:
|
11
|
+
"UnsubscribeURL" : "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:123456789012:test-custom-b2bea71b-e1b8-4b8f-9855-1c92e1f0cd11-CustomResourcesTopic-1E5ZVSSFPY65Z:1d19910d-8377-4c9d-a380-46102f10e36f"
|
12
12
|
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"Type" : "Notification",
|
3
3
|
"MessageId" : "f13ac688-5253-5d90-b825-8ad4f1631b9f",
|
4
|
-
"TopicArn" : "arn:aws:sns:us-east-1:
|
4
|
+
"TopicArn" : "arn:aws:sns:us-east-1:123456789012:test-custom-b2bea71b-e1b8-4b8f-9855-1c92e1f0cd11-CustomResourcesTopic-1E5ZVSSFPY65Z",
|
5
5
|
"Subject" : "AWS CloudFormation custom resource request",
|
6
|
-
"Message" : "{\"RequestType\":\"Delete\",\"TopicArn\":\"arn:aws:sns:us-east-1:
|
6
|
+
"Message" : "{\"RequestType\":\"Delete\",\"TopicArn\":\"arn:aws:sns:us-east-1:123456789012:test-custom-b2bea71b-e1b8-4b8f-9855-1c92e1f0cd11-CustomResourcesTopic-1E5ZVSSFPY65Z\",\"ResponseURL\":\"https://cloudformation-custom-resource-response-useast1.s3.amazonaws.com/arn%3Aaws%3Acloudformation%3Aus-east-1%3A123456789012%3Astack/test-custom-11fa3098-9e58-4fb4-8af3-63e29a8fa4aa/4d120bd0-1db2-11e4-a357-500162a66ca8%7COutputsResource%7Cf3686111-7338-46be-b312-dd1baaea84b9?AWSAccessKeyId=AKIAJNXHFR7P7YGKLDPQ&Expires=1407368464&Signature=YXOhftA3sOP4YR6NV2c78wHkhP4%3D\",\"StackId\":\"arn:aws:cloudformation:us-east-1:123456789012:stack/test-custom-11fa3098-9e58-4fb4-8af3-63e29a8fa4aa/4d120bd0-1db2-11e4-a357-500162a66ca8\",\"RequestId\":\"f3686111-7338-46be-b312-dd1baaea84b9\",\"LogicalResourceId\":\"OutputsResource\",\"PhysicalResourceId\":\"arn:aws:cloudformation:us-east-1:123456789012:stack/test-custom-b2bea71b-e1b8-4b8f-9855-1c92e1f0cd11/39d01580-1db2-11e4-9b37-50fa5262a838\",\"ResourceType\":\"Custom::CloudFormationOutputs\",\"ResourceProperties\":{\"Name\":\"test-custom-b2bea71b-e1b8-4b8f-9855-1c92e1f0cd11\",\"ServiceToken\":\"arn:aws:sns:us-east-1:123456789012:test-custom-b2bea71b-e1b8-4b8f-9855-1c92e1f0cd11-CustomResourcesTopic-1E5ZVSSFPY65Z\"}}",
|
7
7
|
"Timestamp" : "2014-08-06T21:41:04.888Z",
|
8
8
|
"SignatureVersion" : "1",
|
9
9
|
"Signature" : "AkfEKcPydGagg5VJoSjWv1MkgwlCAaKuxHZ8NR6SOZePdcT/6H8OiE7epEjt9C17wtIx/WnqOHS7Nmm5PufogNYsxb2fCcZ9D6Av02vd1M5KwmpsRvWWHR2qLvOQk0lRjkkrD0Ol2Yt9TBwxsmYX77b6Nzg7Fn0qGoPNNwlCyUU0qfIQgXfDZR8SO9AZIS7GJ2MUTzXVJCNc5VoNcEDl+0y0yOrz97TetS4qBXhUaNhgfag/Zt/hMNHR+DKlirTSYWx7HhiSDt2jrlhsLMZy0wzMzKwV0Gp40xVZGc33kk38tt1ChrkKUzpEca3u8pRZ8f2jU0EI0Xh48Sn2tAGrLw==",
|
10
10
|
"SigningCertURL" : "https://sns.us-east-1.amazonaws.com/SimpleNotificationService-e372f8ca30337fdb084e8ac449342c77.pem",
|
11
|
-
"UnsubscribeURL" : "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:
|
11
|
+
"UnsubscribeURL" : "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:123456789012:test-custom-b2bea71b-e1b8-4b8f-9855-1c92e1f0cd11-CustomResourcesTopic-1E5ZVSSFPY65Z:1d19910d-8377-4c9d-a380-46102f10e36f"
|
12
12
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfn-bridge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maurício Linhares
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|