spec/kumogata_convert_spec.rb in kumogata-0.2.0 vs spec/kumogata_convert_spec.rb in kumogata-0.2.1

- old
+ new

@@ -341,10 +341,36 @@ end # config end # AWS__CloudFormation__Init end # Metadata end end + +Outputs do + WebsiteURL do + Value (<<-EOS).fn_join + http://<%= Fn__GetAtt "myEC2Instance", "PublicDnsName" %> + EOS + end + + Base64Str do + Value (<<-EOS).fn_join + <%= Fn__Base64 "AWS CloudFormation" %> + EOS + end + + MappedValue do + Value (<<-EOS).fn_join + <%= Fn__FindInMap "RegionMap", { "Ref" => "AWS::Region" }, 32 %> + EOS + end + + AZ do + Value (<<-EOS).fn_join + <%= Fn__GetAZs "us-east-1" %> + EOS + end +end TEMPLATE json_template = run_client(:convert, :template => template) expect(json_template).to eq((<<-'EOS').chomp) @@ -417,9 +443,73 @@ } } } } } + } + } + }, + "Outputs": { + "WebsiteURL": { + "Value": { + "Fn::Join": [ + "", + [ + "http://", + { + "Fn::GetAtt": [ + "myEC2Instance", + "PublicDnsName" + ] + }, + "\n" + ] + ] + } + }, + "Base64Str": { + "Value": { + "Fn::Join": [ + "", + [ + { + "Fn::Base64": "AWS CloudFormation" + }, + "\n" + ] + ] + } + }, + "MappedValue": { + "Value": { + "Fn::Join": [ + "", + [ + { + "Fn::FindInMap": [ + "RegionMap", + { + "Ref": "AWS::Region" + }, + "32" + ] + }, + "\n" + ] + ] + } + }, + "AZ": { + "Value": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAZs": "us-east-1" + }, + "\n" + ] + ] } } } } EOS