-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hi there,
I'm struggling to use this module to parse an AWS CloudFormation template. The template is mostly strict YAML, but AWS define some "intrinsic functions" which can appear as tag values with a '!'prefix on the function name, followed by its arguments, e.g.
Content:
S3Bucket: !Ref SomeS3Bucketor
OtherContent:
BucketArn: !Sub '{"NodeJsCfnResponseArn":"${LambdaLayerNodeJsCfnResponse}", "NodeJsSendEmailArn":"${LambdaLayerNodeJsSendEmail}"}'When I try to convert these templates to a PowerShell object using ConvertFrom-Yaml, the function arguments seem to be present in the resulting object, but the function itself has gone completely. Contrived example below:
AWSTemplateFormatVersion: 2010-09-09
Description: A contrived CloudFormation Template
Resources:
KmsKeyAlias:
Type: AWS::KMS::Alias
Properties:
AliasName: alias/AKMSKey
TargetKeyId: !Ref AKMSKeyNow run this through the module:
# $Yaml is content as above
$Template = $Yaml | ConvertFrom-Yaml
$Template.Resources.KmsKeyAlias.Properties
Name Value
---- -----
AliasName alias/AKMSKey
TargetKeyId AKMSKeyWhere really I'd prefer to see:
Name Value
---- -----
AliasName alias/AKMSKey
TargetKeyId !Ref AKMSKeyI tried looking at your docs on adding custom schemas, and apparently that's over my YAML event horizon, as I couldn't make head or tail of it.
Any pointers?
Metadata
Metadata
Assignees
Labels
No labels