File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ Parameters:
6262 TopicARN :
6363 Type : String
6464 Default : " "
65- Description : " The ARN of an existing SNS Topic. Ignored if CreateTopic is set to true ."
65+ Description : " The ARN of an existing SNS Topic. If CreateTopic is true, this will be used as the name of the new topic ."
6666
6767 Endpoint :
6868 Type : String
@@ -112,21 +112,18 @@ Resources:
112112 Roles :
113113 - !Ref CloudLogsRole
114114
115- # SNS Topic (optional creation)
116115 CloudTrailNotificationsTopic :
117116 Condition : CreateSNSTopic
118117 Type : " AWS::SNS::Topic"
119118 Properties :
120- TopicName : !Sub "${AWS::StackName}-CloudTrailNotifications"
121- DisplayName : " CloudTrail Notifications for Sysdig"
119+ TopicName : !Select [ 5, !Split [ ":", !Ref TopicARN ] ]
122120
123121 CloudTrailNotificationsSubscription :
124- Condition : CreateSNSTopic
125122 Type : " AWS::SNS::Subscription"
126123 Properties :
127- TopicArn : !Ref CloudTrailNotificationsTopic
124+ TopicArn : !If [ CreateSNSTopic, ! Ref CloudTrailNotificationsTopic, !Ref TopicARN ]
128125 Protocol : " https"
129- Endpoint : ' ${ Endpoint} '
126+ Endpoint : !Ref Endpoint
130127
131128 CloudTrailNotificationsPolicy :
132129 Condition : CreateSNSTopic
You can’t perform that action at this time.
0 commit comments