How to modify multiline parameters in CloudFormation?

谁说胖子不能爱 提交于 2020-12-29 18:41:35

问题


I created a CloudFormation stack using the ECS wizard. I want to customize some UserData entries to modify some parameters. However, as you can see in the picture, the parameters that must appear in multiple lines are shown in one line. Checking the current parameter, it is applied to multiple lines. After modifying this in the web UI, the UserData parameter is changed to one line, so the script does not work. Is there a way to update the values normally?


回答1:


Unfortunately, the CloudFormation console does not currently support inputting multiline parameters

There are a couple workarounds:

  • The aws cli supports multiline parameters: --parameters ParameterKey=<>,ParameterValue='line 1 line 2'
  • Removing the Fn::Base64: function from UserData in the template and passing the already Base64 encoded string as the parameter should remove the need for that parameter being multiline
  • Avoiding explicitly inputting parameter values if using the default or previous value of a parameter is desired: --parameters ParameterKey=<>,UsePreviousValue=true


来源:https://stackoverflow.com/questions/59436611/how-to-modify-multiline-parameters-in-cloudformation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!