简体   繁体   English

换行输出CloudFormation Json模板

[英]New Line output CloudFormation Json Template

This is my Output section for JSON script that I use for CloudFormation template. 这是我用于CloudFormation模板的JSON脚本的“输出”部分。

"Outputs": {


"Value":{"Fn::Join": [" ",["Username : ",{"Ref": "Username"},"Password : ",{"Ref":     "Pass"}]]},

} 

How do I print Output in below format: 如何以以下格式打印输出:

username : abc 用户名:abc
password : abc 密码:abc

Right now I am getting this in same line (Username: abc Password abc). 现在我在同一行(用户名:abc密码abc)。

Why not print these out as separate outputs? 为什么不将它们作为单独的输出打印出来?

  "Outputs" : {
    "Username" : {
      "Description" : "Username",
      "Value": { "Ref": "Username" }
    },
    "Password" : {
      "Description" : "Password",
      "Value": { "Ref": "Password" }
    }
  }

Try appending new line. 尝试附加新行。 It should work. 它应该工作。 As the arguments are taken as string. 由于参数被当作字符串。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM