File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- ' use strict' ;
1+ " use strict" ;
22
33/**
44 * Serverless Plugin to add a `RecursiveLoop` property to AWS Lambda functions.
@@ -22,6 +22,19 @@ class ServerlessRecursiveLoopPlugin {
2222 this . hooks = {
2323 "package:compileFunctions" : this . addRecursiveLoopProperty . bind ( this ) ,
2424 } ;
25+ if (
26+ this . serverless . configSchemaHandler &&
27+ this . serverless . configSchemaHandler . defineFunctionProperties
28+ ) {
29+ this . serverless . configSchemaHandler . defineFunctionProperties ( "aws" , {
30+ properties : {
31+ recursiveLoop : {
32+ type : "string" ,
33+ enum : [ "Allow" , "Terminate" ] ,
34+ } ,
35+ } ,
36+ } ) ;
37+ }
2538 }
2639
2740 /**
@@ -43,10 +56,6 @@ class ServerlessRecursiveLoopPlugin {
4356 this . provider . naming . getLambdaLogicalId ( functionName )
4457 ] ;
4558 functionResource . Properties . RecursiveLoop = recursiveLoop ;
46- } else {
47- this . serverless . cli . log (
48- `Invalid RecursiveLoop value in function ${ functionName } . Allowed values are 'Allow' or 'Terminate'.`
49- ) ;
5059 }
5160 }
5261 }
You can’t perform that action at this time.
0 commit comments