spec/kumogata_convert_spec.rb in kumogata-0.5.9 vs spec/kumogata_convert_spec.rb in kumogata-0.5.10

- old
+ new

@@ -771,10 +771,22 @@ AZ do Value (<<-EOS).fn_join <%= Fn__GetAZs "us-east-1" %> EOS end + + ConditionalValue do + Value (<<-EOS).fn_join + <%= Fn__If ["Tokyo", "ap-northeast-1", _{ Ref "AWS::Region" }] %> + EOS + end + + SelectedValue do + Value (<<-EOS).fn_join + <%= Fn__Select [1, _ { Fn__GetAZs "ap-northeast-1" }] %> + EOS + end end TEMPLATE json_template = run_client(:convert, :template => template) @@ -908,9 +920,46 @@ "Fn::Join": [ "", [ { "Fn::GetAZs": "us-east-1" + }, + "\n" + ] + ] + } + }, + "ConditionalValue": { + "Value": { + "Fn::Join": [ + "", + [ + { + "Fn::If": [ + "Tokyo", + "ap-northeast-1", + { + "Ref": "AWS::Region" + } + ] + }, + "\n" + ] + ] + } + }, + "SelectedValue": { + "Value": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "ap-northeast-1" + } + ] }, "\n" ] ] }