Skip to content

Commit

Permalink
fix(Config Schema): validate resourcePolicy is array
Browse files Browse the repository at this point in the history
In the AWS provider, the `resourcePolicy` must be an array. If you paste
a resource policy from the console, your stack will fail to create.
  • Loading branch information
Geoff Baskwill committed Aug 11, 2020
1 parent 4660acd commit f8c1f28
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/plugins/aws/provider/awsProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ class AwsProvider {

// TODO: Complete schema, see https://github.com/serverless/serverless/issues/8016
serverless.configSchemaHandler.defineProvider('aws', {
provider: {
properties: {
resourcePolicy: {
type: 'array',
items: {
type: 'object',
},
},
},
},
function: {
// TODO: Complete schema, see https://github.com/serverless/serverless/issues/8017
properties: { handler: { type: 'string' } },
Expand Down

0 comments on commit f8c1f28

Please sign in to comment.