-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.yaml
More file actions
240 lines (203 loc) · 8.14 KB
/
main.yaml
File metadata and controls
240 lines (203 loc) · 8.14 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
AWSTemplateFormatVersion: '2010-09-09'
Description: >-
SSM Parameter Store entries. Values may differ between prod and non-prod environments
Parameters:
StackName:
Type: String
EnableNotificationsInternalValue:
Type: String
Default: false
AllowedValues:
- true
- false
EnableNotificationsExternalValue:
Type: String
Default: false
AllowedValues:
- true
- false
EnabledSiteODSCodesValue:
Type: String
Default: " "
EnabledSupplierApplicationIDsValue:
Type: String
Default: " "
BlockedSiteODSCodesValue:
Type: String
Default: " "
NotifyRoutingPlanIDValue:
Type: String
Default: " "
NotifyAPIBaseURLValue:
Type: String
Default: " "
TestPresciptionsParamValue1:
Type: String
TestPresciptionsParamValue2:
Type: String
TestPresciptionsParamValue3:
Type: String
TestPresciptionsParamValue4:
Type: String
Resources:
EnabledSiteODSCodesParameter:
Type: AWS::SSM::Parameter
Properties:
Name: !Sub ${StackName}-PSUNotifyEnabledSiteODSCodes
Description: "List of site ODS codes for which notifications are enabled"
Type: String
Value: !Ref EnabledSiteODSCodesValue
EnabledSupplierApplicationIDsParameter:
Type: AWS::SSM::Parameter
Properties:
Name: !Sub ${StackName}-PSUNotifyEnabledSupplierApplicationIDs
Description: "List of supplier application IDs for which notifications are enabled"
Type: String
Value: !Ref EnabledSupplierApplicationIDsValue
BlockedSiteODSCodesParameter:
Type: AWS::SSM::Parameter
Properties:
Name: !Sub ${StackName}-PSUNotifyBlockedSiteODSCodes
Description: "List of site ODS codes for which notifications are blocked"
Type: String
Value: !Ref BlockedSiteODSCodesValue
NotifyRoutingPlanIDParameter:
Type: AWS::SSM::Parameter
Properties:
Name: !Sub ${StackName}-PSUNotifyRoutingPlanID
Description: "Notify Routing Plan ID"
Type: String
Value: !Ref NotifyRoutingPlanIDValue
NotifyAPIBaseURLParameter:
Type: AWS::SSM::Parameter
Properties:
Name: !Sub ${StackName}-PSUNotifyApiBaseUrl
Description: "Notify API Base URL"
Type: String
Value: !Ref NotifyAPIBaseURLValue
EnableNotificationsExternal:
Type: AWS::SSM::Parameter
Properties:
Name: !Sub ${StackName}-EnableNotificationsExternal
Description: "Toggle on or off if we make real requests to the NHS notify service"
Type: String
Value: !Ref EnableNotificationsExternalValue
EnableNotificationsInternal:
Type: AWS::SSM::Parameter
Properties:
Name: !Sub ${StackName}-EnableNotificationsInternal
Description: "Toggle the notifications integration entirely"
Type: String
Value: !Ref EnableNotificationsInternalValue
TestPrescriptionsParameter1:
Type: AWS::SSM::Parameter
Properties:
Name: !Sub ${StackName}-TEST_PRESCRIPTIONS_1
Description: "Toggle the notifications integration entirely"
Type: String
Value: !Ref TestPresciptionsParamValue1
TestPrescriptionsParameter2:
Type: AWS::SSM::Parameter
Properties:
Name: !Sub ${StackName}-TEST_PRESCRIPTIONS_2
Description: "Toggle the notifications integration entirely"
Type: String
Value: !Ref TestPresciptionsParamValue2
TestPrescriptionsParameter3:
Type: AWS::SSM::Parameter
Properties:
Name: !Sub ${StackName}-TEST_PRESCRIPTIONS_3
Description: "Toggle the notifications integration entirely"
Type: String
Value: !Ref TestPresciptionsParamValue3
TestPrescriptionsParameter4:
Type: AWS::SSM::Parameter
Properties:
Name: !Sub ${StackName}-TEST_PRESCRIPTIONS_4
Description: "Toggle the notifications integration entirely"
Type: String
Value: !Ref TestPresciptionsParamValue4
GetNotificationsParameterPolicy:
Type: AWS::IAM::ManagedPolicy
Properties:
Description: "Allows reading SSM parameters"
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action:
- ssm:GetParameter
- ssm:GetParameters
Resource:
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-PSUNotifyEnabledSiteODSCodes
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-PSUNotifyEnabledSupplierApplicationIDs
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-PSUNotifyBlockedSiteODSCodes
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-PSUNotifyRoutingPlanID
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-PSUNotifyApiBaseUrl
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-EnableNotificationsExternal
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-EnableNotificationsInternal
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-TEST_PRESCRIPTIONS_1
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-TEST_PRESCRIPTIONS_2
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-TEST_PRESCRIPTIONS_3
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-TEST_PRESCRIPTIONS_4
Outputs:
EnabledSiteODSCodesParameterName:
Description: "Name of the SSM parameter holding enabled site ODS codes"
Value: !Ref EnabledSiteODSCodesParameter
Export:
Name: !Sub ${StackName}-PSUNotifyEnabledSiteODSCodesParam
EnabledSupplierApplicationIDsParameterName:
Description: "Name of the SSM parameter holding enabled supplier apigee application IDs"
Value: !Ref EnabledSupplierApplicationIDsParameter
Export:
Name: !Sub ${StackName}-PSUNotifyEnabledSupplierApplicationIDsParam
BlockedSiteODSCodesParameterName:
Description: "Name of the SSM parameter holding blocked site ODS codes"
Value: !Ref BlockedSiteODSCodesParameter
Export:
Name: !Sub ${StackName}-PSUNotifyBlockedSiteODSCodesParam
NotifyRoutingPlanIDParameterName:
Description: "Name of the SSM parameter holding the Notify Routing Plan ID"
Value: !Ref NotifyRoutingPlanIDParameter
Export:
Name: !Sub ${StackName}-PSUNotifyRoutingPlanIDParam
NotifyAPIBaseURLParameterName:
Description: "Name of the SSM parameter holding the Notify API Base URL"
Value: !Ref NotifyAPIBaseURLParameter
Export:
Name: !Sub ${StackName}-PSUNotifyApiBaseUrlParam
EnableNotificationsExternalName:
Description: "Name of the SSM parameter holding the Notify API Base URL"
Value: !Ref EnableNotificationsExternal
Export:
Name: !Sub ${StackName}-EnableNotificationsExternalName
EnableNotificationsInternalName:
Description: "Name of the SSM parameter holding the Notify API Base URL"
Value: !Ref EnableNotificationsInternal
Export:
Name: !Sub ${StackName}-EnableNotificationsInternalName
GetNotificationsParameterPolicy:
Description: Access to the parameters used by the notifications integration
Value: !Ref GetNotificationsParameterPolicy
Export:
Name: !Sub ${StackName}-GetNotificationsParameterPolicy
TestPrescriptionsParameterName1:
Description: "Name of the SSM parameter holding test prescriptions 1"
Value: !Ref TestPrescriptionsParameter1
Export:
Name: !Sub ${StackName}-TestPrescriptionsParameterName1
TestPrescriptionsParameterName2:
Description: "Name of the SSM parameter holding test prescriptions 2"
Value: !Ref TestPrescriptionsParameter2
Export:
Name: !Sub ${StackName}-TestPrescriptionsParameterName2
TestPrescriptionsParameterName3:
Description: "Name of the SSM parameter holding test prescriptions 3"
Value: !Ref TestPrescriptionsParameter3
Export:
Name: !Sub ${StackName}-TestPrescriptionsParameterName3
TestPrescriptionsParameterName4:
Description: "Name of the SSM parameter holding test prescriptions 4"
Value: !Ref TestPrescriptionsParameter4
Export:
Name: !Sub ${StackName}-TestPrescriptionsParameterName4