@@ -206,6 +206,10 @@ Resources:
206
206
- arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceRole
207
207
208
208
ExternalService :
209
+ DependsOn :
210
+ - ExternalTargetGroup
211
+ - TaskDefinition
212
+ - ServiceRole
209
213
Condition : IsExternalFacing
210
214
Type : AWS::ECS::Service
211
215
Properties :
@@ -228,6 +232,10 @@ Resources:
228
232
TargetGroupArn : !Ref ExternalTargetGroup
229
233
230
234
InternalService :
235
+ DependsOn :
236
+ - InternalTargetGroup
237
+ - TaskDefinition
238
+ - ServiceRole
231
239
Condition : IsInternalFacing
232
240
Type : AWS::ECS::Service
233
241
Properties :
@@ -249,7 +257,6 @@ Resources:
249
257
ContainerPort : 8080
250
258
TargetGroupArn : !Ref InternalTargetGroup
251
259
252
-
253
260
TaskDefinition :
254
261
Type : AWS::ECS::TaskDefinition
255
262
Properties :
@@ -283,6 +290,8 @@ Resources:
283
290
Value : !Ref SpringProfile
284
291
285
292
HTTPCodeExternalTarget5XXTooHighAlarm :
293
+ DependsOn :
294
+ - ExternalTargetGroup
286
295
Condition : CreateExternalAlarms
287
296
Type : ' AWS::CloudWatch::Alarm'
288
297
Properties :
@@ -304,6 +313,9 @@ Resources:
304
313
- Name : TargetGroup
305
314
Value : !GetAtt 'ExternalTargetGroup.TargetGroupFullName'
306
315
NoHealthyExternalServiceAlarm :
316
+ DependsOn :
317
+ - ExternalTargetGroup
318
+ - ExternalService
307
319
Condition : CreateExternalAlarms
308
320
Type : ' AWS::CloudWatch::Alarm'
309
321
Properties :
@@ -326,6 +338,8 @@ Resources:
326
338
Value : !GetAtt 'ExternalTargetGroup.TargetGroupFullName'
327
339
328
340
HTTPCodeInternalTarget5XXTooHighAlarm :
341
+ DependsOn :
342
+ - InternalTargetGroup
329
343
Condition : CreateInternalAlarms
330
344
Type : ' AWS::CloudWatch::Alarm'
331
345
Properties :
@@ -347,6 +361,9 @@ Resources:
347
361
- Name : TargetGroup
348
362
Value : !GetAtt 'InternalTargetGroup.TargetGroupFullName'
349
363
NoHealthyInternalServiceAlarm :
364
+ DependsOn :
365
+ - InternalTargetGroup
366
+ - InternalService
350
367
Condition : CreateInternalAlarms
351
368
Type : ' AWS::CloudWatch::Alarm'
352
369
Properties :
0 commit comments