diff --git a/lib/plugins/aws/provider/awsProvider.js b/lib/plugins/aws/provider/awsProvider.js index f9a68312903e..57f91fba5322 100644 --- a/lib/plugins/aws/provider/awsProvider.js +++ b/lib/plugins/aws/provider/awsProvider.js @@ -222,11 +222,6 @@ class AwsProvider { required: ['Fn::Sub'], additionalProperties: false, }, - awsLambdaLayers: { - type: 'array', - items: { $ref: '#/definitions/awsArn' }, - }, - awsLambdaMemorySize: { type: 'integer', multipleOf: 64, minimum: 128, maximum: 3008 }, awsLambdaEnvironment: { type: 'object', patternProperties: { @@ -240,6 +235,22 @@ class AwsProvider { }, additionalProperties: false, }, + awsLambdaLayers: { + type: 'array', + items: { $ref: '#/definitions/awsArn' }, + }, + awsLambdaMemorySize: { type: 'integer', multipleOf: 64, minimum: 128, maximum: 3008 }, + awsLambdaPackage: { + type: 'object', + properties: { + include: { type: 'array', items: { type: 'string' } }, + exclude: { type: 'array', items: { type: 'string' } }, + excludeDevDependencies: { type: 'boolean' }, + artifact: { type: 'string' }, + individually: { type: 'boolean' }, + }, + additionalProperties: false, + }, awsLambdaRole: { anyOf: [ { type: 'string', minLength: 1 }, @@ -289,17 +300,19 @@ class AwsProvider { }, }, }, + awsResourceCondition: { type: 'string' }, + awsResourceDependsOn: { + oneOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }], + }, awsResourceProperties: { Properties: { type: 'object' }, CreationPolicy: { type: 'object' }, DeletionPolicy: { type: 'string' }, - DependsOn: { - oneOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }], - }, + DependsOn: { $ref: '#/definitions/awsResourceDependsOn' }, Metadata: { type: 'object' }, UpdatePolicy: { type: 'object' }, UpdateReplacePolicy: { type: 'string' }, - Condition: { type: 'string' }, + Condition: { $ref: '#/definitions/awsResourceCondition' }, }, awsResourceTags: { type: 'object', @@ -410,6 +423,7 @@ class AwsProvider { }, }, memorySize: { $ref: '#/definitions/awsLambdaMemorySize' }, + package: { $ref: '#/definitions/awsLambdaPackage' }, resourcePolicy: { type: 'array', items: { @@ -442,8 +456,8 @@ class AwsProvider { { $ref: '#/definitions/awsCfFunction' }, ], }, - condition: {}, - dependsOn: {}, + condition: { $ref: '#/definitions/awsResourceCondition' }, + dependsOn: { $ref: '#/definitions/awsResourceDependsOn' }, description: { type: 'string', maxLength: 256 }, disableLogs: { type: 'boolean' }, environment: { $ref: '#/definitions/awsLambdaEnvironment' }, @@ -476,7 +490,7 @@ class AwsProvider { { $ref: '#/definitions/awsCfFunction' }, ], }, - package: {}, + package: { $ref: '#/definitions/awsLambdaPackage' }, provisionedConcurrency: { type: 'integer', minimum: 1 }, reservedConcurrency: { type: 'integer', minimum: 0 }, role: { $ref: '#/definitions/awsLambdaRole' },