cloudformation with ssm key variable

0

Hi,

I have the following value stored in the SSM key

key: ecrimage-002
value: myimagename

I am trying to retrieve the value by supplying key and referenceid (which is 002) as a "parameter variable" and I cannot seem to get it working in cloudformation.

code is:

"Type": "AWS::ECS::Cluster",  
"Properties" : {  
   "ClusterName" : "{{resolve:ssm:ecrimage:1}}"  

How to pass $referenceid above so I get the value of ecrimage-002 key ? it does not like ecrimage-$referenceid or ecrimage:1}}-$referenceid"

Thanks

已提问 5 年前228 查看次数
1 回答
0

https://gist.github.com/rshettynj/a04f2165c21dd56763a0fa37f91acb66 I answered my own question.. Nothing special here.. fn::sub does the work.

Edited by: rshettynj on Mar 15, 2019 7:29 AM

已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则