forked from dxctechnology/dxcf-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommon-GroupTopics.yaml
76 lines (76 loc) · 2.2 KB
/
Common-GroupTopics.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
AWSTemplateFormatVersion: 2010-09-09
Description: Common-GroupTopics Template.
This creates Group SNS Topics.These Topics are used for Group Notifications, not directly related to System Operation.
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: Topic Configuration
Parameters:
- TopicPrefix
ParameterLabels:
TopicPrefix:
default: Topic Prefix
Parameters:
TopicPrefix:
Description: Optional Prefix for Topic Display Name
Type: String
Default: ''
AllowedPattern: (^$|^[A-Z][A-Z0-9]{1,4}$)
ConstraintDescription: must begin with an upper-case letter and consist of 1 to 4 additional upper-case letters or digits, if specified.
Conditions:
ConfigureTopicPrefix: !Not [ !Equals [ !Ref TopicPrefix, '' ]]
Resources:
AdministratorsTopic:
Type: AWS::SNS::Topic
Properties:
TopicName: Administrators
DisplayName: !If
- ConfigureTopicPrefix
- !Sub ${TopicPrefix} Administrators
- Administrators
ManagersTopic:
Type: AWS::SNS::Topic
Properties:
TopicName: Managers
DisplayName: !If
- ConfigureTopicPrefix
- !Sub ${TopicPrefix} Managers
- Managers
DevelopersTopic:
Type: AWS::SNS::Topic
Properties:
TopicName: Developers
DisplayName: !If
- ConfigureTopicPrefix
- !Sub ${TopicPrefix} Developers
- Developers
UsersTopic:
Type: AWS::SNS::Topic
Properties:
TopicName: Users
DisplayName: !If
- ConfigureTopicPrefix
- !Sub ${TopicPrefix} Users
- Users
Outputs:
AdministratorsTopic:
Description: The Administrators Topic ARN
Value: !Ref AdministratorsTopic
Export:
Name: !Sub ${AWS::StackName}-AdministratorsTopic
ManagersTopic:
Description: The Managers Topic ARN
Value: !Ref ManagersTopic
Export:
Name: !Sub ${AWS::StackName}-ManagersTopic
DevelopersTopic:
Description: The Developers Topic ARN
Value: !Ref DevelopersTopic
Export:
Name: !Sub ${AWS::StackName}-DevelopersTopic
UsersTopic:
Description: The Users Topic ARN
Value: !Ref UsersTopic
Export:
Name: !Sub ${AWS::StackName}-UsersTopic