Skip to content

Commit

Permalink
Merge branch 'main' into feature/AT-10944
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/index.ts
#	src/types.ts
#	test/unit-tests/index-test.ts
  • Loading branch information
rddimon committed Jan 2, 2024
2 parents 1c9c016 + 7ce8869 commit d73b004
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,45 @@ class LogForwardingPlugin {
if (v3Utils?.log) {
Globals.v3Utils = v3Utils;
}

// schema for the function section of serverless.yml
this.serverless.configSchemaHandler.defineFunctionProperties('aws', {
properties: {
logForwarding: {
type: 'object',
properties: {
enabled: {
type: 'boolean',
},
},
required: ['enabled'],
},
},
required: [],
});

// schema for the custom props section of serverless.yml
this.serverless.configSchemaHandler.defineCustomProperties({
properties: {
logForwarding: {
type: 'object',
properties: {
destinationARN: { type: 'string' },
roleArn: { type: 'string' },
filterPattern: { type: 'string' },
normalizedFilterID: { type: 'string' },
stages: {
type: 'array',
uniqueItems: true,
items: { type: 'string' },
},
createLambdaPermission: { type: 'boolean' },
},
required: ['destinationARN'],
},
},
required: ['logForwarding'],
});
}

loadConfig (): void {
Expand Down

0 comments on commit d73b004

Please sign in to comment.