From 7b36650185ba4eec97671d933ab96fbd357b7210 Mon Sep 17 00:00:00 2001 From: Raul Zaldana Date: Fri, 2 Oct 2020 14:47:03 -0400 Subject: [PATCH 1/2] added Fn::Transport to Resources.resources on validation schema --- lib/plugins/aws/provider/awsProvider.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/plugins/aws/provider/awsProvider.js b/lib/plugins/aws/provider/awsProvider.js index 65abcf7a109..4e40348fed1 100644 --- a/lib/plugins/aws/provider/awsProvider.js +++ b/lib/plugins/aws/provider/awsProvider.js @@ -282,6 +282,21 @@ class AwsProvider { required: ['Fn::Sub'], additionalProperties: false, }, + awsCfTransform: { + type: 'object', + properties: { + 'Fn::Transform': { + type: 'object', + properties: { + Name: { type: 'string' }, + Parameters: { type: 'object' }, + }, + required: ['Name'], + additionalProperties: false, + }, + }, + required: ['Fn::Transform'], + }, awsIamPolicyAction: { type: 'array', items: { type: 'string' } }, awsIamPolicyPrincipal: { anyOf: [ @@ -796,6 +811,9 @@ class AwsProvider { // See also https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html Resources: { type: 'object', + properties: { + $ref: '#/definitions/awsCfTransform/properties', + }, patternProperties: { '^[a-zA-Z0-9]{1,255}$': { type: 'object', From 5ea6464fb35cb88955a255924ec73bbcec98f77c Mon Sep 17 00:00:00 2001 From: Raul Zaldana Date: Mon, 5 Oct 2020 09:50:20 -0400 Subject: [PATCH 2/2] removed awsCfTransform definition --- lib/plugins/aws/provider/awsProvider.js | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/lib/plugins/aws/provider/awsProvider.js b/lib/plugins/aws/provider/awsProvider.js index 4e40348fed1..179ecdd453d 100644 --- a/lib/plugins/aws/provider/awsProvider.js +++ b/lib/plugins/aws/provider/awsProvider.js @@ -282,21 +282,6 @@ class AwsProvider { required: ['Fn::Sub'], additionalProperties: false, }, - awsCfTransform: { - type: 'object', - properties: { - 'Fn::Transform': { - type: 'object', - properties: { - Name: { type: 'string' }, - Parameters: { type: 'object' }, - }, - required: ['Name'], - additionalProperties: false, - }, - }, - required: ['Fn::Transform'], - }, awsIamPolicyAction: { type: 'array', items: { type: 'string' } }, awsIamPolicyPrincipal: { anyOf: [ @@ -812,7 +797,15 @@ class AwsProvider { Resources: { type: 'object', properties: { - $ref: '#/definitions/awsCfTransform/properties', + 'Fn::Transform': { + type: 'object', + properties: { + Name: { type: 'string' }, + Parameters: { type: 'object' }, + }, + required: ['Name'], + additionalProperties: false, + }, }, patternProperties: { '^[a-zA-Z0-9]{1,255}$': {