@@ -43,10 +43,26 @@ Parameters:
4343 - " No"
4444 Default : " Yes"
4545 Description : Whether to deploy cloud scanning or not
46+ ECRImageScanningDeploy :
47+ Type : String
48+ AllowedValues :
49+ - " Yes"
50+ - " No"
51+ Default : " Yes"
52+ Description : Whether to deploy ECR Image Scanning or not
53+ ECSImageScanningDeploy :
54+ Type : String
55+ AllowedValues :
56+ - " Yes"
57+ - " No"
58+ Default : " Yes"
59+ Description : Whether to deploy ECS Image Scanning or not
4660
4761Conditions :
4862 VerifySSL : !Equals [ !Ref VerifySSL, "Yes" ]
4963 DeployCloudScanning : !Equals [ !Ref DeployCloudScanning, "Yes"]
64+ ECRImageScanningDeploy : !Equals [ !Ref ECRImageScanningDeploy, "Yes"]
65+ ECSImageScanningDeploy : !Equals [ !Ref ECSImageScanningDeploy, "Yes"]
5066
5167Resources :
5268
@@ -231,15 +247,31 @@ Resources:
231247 Scanners :
232248 ' Fn::If ' :
233249 - DeployCloudScanning
234- - !Sub |
250+ - !Sub
251+ - |
235252
236- - aws-ecr:
237- codeBuildProject: ${BuildProject}
238- secureAPITokenSecretName: ${SysdigSecureAPITokenSsm}
239- - aws-ecs:
240- codeBuildProject: ${BuildProject}
241- secureAPITokenSecretName: ${SysdigSecureAPITokenSsm}
253+ ${ECRCode}
254+ ${ECSCode}
255+ - ECRCode :
256+ ' Fn::If ' :
257+ - ECRImageScanningDeploy
258+ - !Sub |
259+
260+ - aws-ecr:
261+ codeBuildProject: ${BuildProject}
262+ secureAPITokenSecretName: ${SysdigSecureAPITokenSsm}
263+ - " "
264+ ECSCode :
265+ ' Fn::If ' :
266+ - ECSImageScanningDeploy
267+ - !Sub |
268+
269+ - aws-ecs:
270+ codeBuildProject: ${BuildProject}
271+ secureAPITokenSecretName: ${SysdigSecureAPITokenSsm}
272+ - " "
242273 - " []"
274+
243275 Secrets :
244276 - Name : SECURE_URL
245277 ValueFrom : !Sub arn:${AWS::Partition}:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${SysdigSecureEndpointSsm}
0 commit comments