From 447e4a26c1889fee69a84a33164cf31c60bec4c3 Mon Sep 17 00:00:00 2001 From: Tavis Rudd Date: Fri, 29 Nov 2019 12:23:26 -0800 Subject: [PATCH] add some newer cfn intrinsic fn tags we're missing: CIDR, Transform --- src/yaml.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/yaml.ts b/src/yaml.ts index 5833ba0d..c9befb67 100644 --- a/src/yaml.ts +++ b/src/yaml.ts @@ -57,6 +57,7 @@ function addCFNTagType(tag_name: string, kind: YamlKind, resolve?: Resolver) { addCFNTagType('Base64', 'scalar'); addCFNTagType('Base64', 'mapping'); +addCFNTagType('CIDR', 'scalar'); // [ MapName, TopLevelKey, SecondLevelKey ] export class FindInMap extends Tag {} @@ -74,6 +75,9 @@ addCFNTagType('GetAZs', 'sequence'); // TODO add !Transform +// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline-action-reference.html +addCFNTagType('GetParam', 'sequence'); + // ImportValue will be either a literal string or a !Sub string export class ImportValue extends Tag {} customTags.ImportValue = ImportValue; @@ -96,9 +100,8 @@ addCFNTagType('Sub', 'scalar'); addCFNTagType('Sub', 'sequence'); addCFNTagType('Sub', 'mapping'); - -// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline-action-reference.html -addCFNTagType('GetParam', 'sequence'); +// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-transform.html +addCFNTagType('Transform', 'mapping'); // http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html addCFNTagType('And', 'sequence');