fix: Recognize Fn::Select in environment config schema (#11114)

This commit is contained in:
John Minns 2022-05-26 15:55:11 +01:00 committed by GitHub
parent 497529ad56
commit ed111e021b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -353,6 +353,16 @@ class AwsProvider {
required: ['Fn::GetAtt'],
additionalProperties: false,
},
awsCfGetAZs: {
type: 'object',
properties: {
'Fn::GetAZs': {
oneOf: [{ type: 'string', minLength: 1 }, { $ref: '#/definitions/awsCfRef' }],
},
},
required: ['Fn::GetAZs'],
additionalProperties: false,
},
awsCfImport: {
type: 'object',
properties: {
@ -399,6 +409,31 @@ class AwsProvider {
required: ['Fn::Join'],
additionalProperties: false,
},
awsCfSelect: {
type: 'object',
properties: {
'Fn::Select': {
type: 'array',
minItems: 2,
maxItems: 2,
items: {
anyOf: [
{ type: 'number' },
{ type: 'string' },
{ type: 'array' },
{ $ref: '#/definitions/awsCfFindInMap' },
{ $ref: '#/definitions/awsCfGetAtt' },
{ $ref: '#/definitions/awsCfGetAZs' },
{ $ref: '#/definitions/awsCfIf' },
{ $ref: '#/definitions/awsCfSplit' },
{ $ref: '#/definitions/awsCfRef' },
],
},
},
},
required: ['Fn::Select'],
additionalProperties: false,
},
awsCfRef: {
type: 'object',
properties: {
@ -531,6 +566,7 @@ class AwsProvider {
{ const: '' },
{ $ref: '#/definitions/awsCfInstruction' },
{ $ref: '#/definitions/awsCfIf' },
{ $ref: '#/definitions/awsCfSelect' },
],
},
},