如果我有类似的参数
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
答案 0 :(得分:1)
您可以使用:
Name: !Join [ '-', [!Ref Owner, !Ref Project] ]
这将生成类似于ownerX-projectY
答案 1 :(得分:1)
你可以
Name: !Sub "${Owner}-${Project}"