mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
feat(AWS Lambda): Recognize Fn::If for properties of vpc (#10877)
This commit is contained in:
parent
12601e7760
commit
6a86ed77f8
@ -578,7 +578,12 @@ class AwsProvider {
|
||||
anyOf: [
|
||||
{
|
||||
type: 'array',
|
||||
items: { $ref: '#/definitions/awsCfInstruction' },
|
||||
items: {
|
||||
anyOf: [
|
||||
{ $ref: '#/definitions/awsCfInstruction' },
|
||||
{ $ref: '#/definitions/awsCfIf' },
|
||||
],
|
||||
},
|
||||
maxItems: 5,
|
||||
},
|
||||
{ $ref: '#/definitions/awsCfSplit' },
|
||||
@ -589,7 +594,12 @@ class AwsProvider {
|
||||
anyOf: [
|
||||
{
|
||||
type: 'array',
|
||||
items: { $ref: '#/definitions/awsCfInstruction' },
|
||||
items: {
|
||||
anyOf: [
|
||||
{ $ref: '#/definitions/awsCfInstruction' },
|
||||
{ $ref: '#/definitions/awsCfIf' },
|
||||
],
|
||||
},
|
||||
maxItems: 16,
|
||||
},
|
||||
{ $ref: '#/definitions/awsCfSplit' },
|
||||
|
||||
@ -1126,8 +1126,8 @@ describe('lib/plugins/aws/package/compile/functions/index.test.js', () => {
|
||||
fnImage: { image: imageWithSha },
|
||||
foo: {
|
||||
vpc: {
|
||||
subnetIds: ['subnet-02020202'],
|
||||
securityGroupIds: ['sg-1b1b1b1b'],
|
||||
subnetIds: ['subnet-02020202', { 'Fn::If': ['cond', 'first', 'second'] }],
|
||||
securityGroupIds: ['sg-1b1b1b1b', { 'Fn::If': ['cond', 'first', 'second'] }],
|
||||
},
|
||||
kmsKeyArn: 'arn:aws:kms:region:accountid:fun/ction',
|
||||
tracing: 'PassThrough',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user