Cloudformation嵌套函数EC2图像生成器

问题描述 投票:0回答:1
Parameters:
 arn:
  Type:String
  Description: Add comp arn as comma delimited string


Resources:
Type: AWS::ImageBuilder::ImageRecipe
  Properties: 
  BlockDeviceMappings: 
    - InstanceBlockDeviceMapping
  Components: 
    - ComponentArn:"arn"
    - ComponentArn:"arn"
  Description: String
  Name: String
  ParentImage: String
  Tags: 
    Key : Value
  Version: String

我正在尝试将参数值(arn)传递给堆栈中的ComponentArn键。问题是我需要将参数值作为逗号分隔的字符串。我不知道如何在此处拆分和添加它。

amazon-cloudformation
1个回答
0
投票

为此,您使用CommaDelimitedList参数类型。

Parameters:
 arn:
  Type: CommaDelimitedList
  Description: Add comp arn as comma delimited string

然后您可以使用Select引用列表中的单个elemnet。>

© www.soinside.com 2019 - 2024. All rights reserved.