Skip to content

Commit

Permalink
Add package, condition and dependsOn property
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericbarthelet committed Sep 20, 2020
1 parent 28bc5fa commit 72211f7
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions lib/plugins/aws/provider/awsProvider.js
Expand Up @@ -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: {
Expand All @@ -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 },
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -410,6 +423,7 @@ class AwsProvider {
},
},
memorySize: { $ref: '#/definitions/awsLambdaMemorySize' },
package: { $ref: '#/definitions/awsLambdaPackage' },
resourcePolicy: {
type: 'array',
items: {
Expand Down Expand Up @@ -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' },
Expand Down Expand Up @@ -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' },
Expand Down

0 comments on commit 72211f7

Please sign in to comment.