MAK*_*MAK 7 aws-cloudformation amazon-cognito aws-userpools
我正在尝试使用 YAML 创建 AWS CloudFormation 模板。我添加一个 UserPool 资源,如下所示。用户池名称和 ID 应通过参数值获取,即,如果参数 paramUserPoolName 的值为“Sample”,则:
用户池名称 = 示例
UserPool 资源名称 = SampleUserPool 即“paramUserPoolName + UserPool”的串联值
Parameters:
paramUserPoolName:
Type: String
Resources:
<I need 'paramUserPoolName + UserPool' here >:
Type: 'AWS::Cognito::UserPool'
Properties: {
"UserPoolName": paramUserPoolName
}
Run Code Online (Sandbox Code Playgroud)
如何在 CloudFormation 模板中动态创建资源 id?
附:
以下工作有效:
Resources:
SampleUserPool:
Type: 'AWS::Cognito::UserPool'
Properties:
UserPoolName: !Sub ${paramUserPoolName}UserPool
Run Code Online (Sandbox Code Playgroud)
kic*_*hik 13
Parameters:
paramUserPoolName:
Type: String
Resources:
Type: 'AWS::Cognito::UserPool'
Properties:
UserPoolName: !Sub ${paramUserPoolName}UserPool
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3836 次 |
| 最近记录: |