LoginSignup
2
1

More than 5 years have passed since last update.

aws cloudformation コマンドラインで CommaDelimitedList パラメータを渡す

Posted at

Parameters"Type": "CommaDelimitedList" を指定すると、コンマ区切り文字列によって配列を渡すことができる。
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html

コマンドラインからもやってみる

$ aws cloudformation create-stack (略) --parameters ParameterKey=MyKey,ParameterValue='value1,value2'

Error parsing parameter '--parameters': should be: Key value pairs, with multiple values separated by a space.
--parameters ParameterKey=string,ParameterValue=string,UsePreviousValue=boolean ParameterKey=string,ParameterValue=string,UsePreviousValue=boolean

エラーになった。ぐぬぬ

以下のように重ねてエスケープすればよい。

$ aws cloudformation create-stack (略) --parameters ParameterKey=MyKey,ParameterValue='value1\\\,value2'
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1