引用多参数Cloudformation AWS

时间:2018-10-01 14:28:18

标签: amazon-cloudformation

如果我有类似的参数

Parameters:

 Owner:
   Description: Enter Team or Individual Name Responsible for the Stack.
   Type: String
   Default: Name

 Project:
  Description: Enter Project Name.
  Type: String
  Default: Whatever

有没有一种可以同时引用它们的方式:

Resources:

Resource:
  Properties:
    Name: !Ref Owner- !Sub ${Project}

merci A

2 个答案:

答案 0 :(得分:1)

您可以使用:

Name: !Join [ '-', [!Ref Owner, !Ref Project] ]

这将生成类似于ownerX-projectY

答案 1 :(得分:1)