Skip to content

Commit

Permalink
add some newer cfn intrinsic fn tags we're missing: CIDR, Transform
Browse files Browse the repository at this point in the history
  • Loading branch information
tavisrudd committed Nov 29, 2019
1 parent 0f522ef commit 447e4a2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string[]> {}
Expand All @@ -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<string | Sub> {}
customTags.ImportValue = ImportValue;
Expand All @@ -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');
Expand Down

0 comments on commit 447e4a2

Please sign in to comment.