amazon-web-services - 如何在cloudformation中为资源自定义名称添加随机后缀值?
问题描述
我正在使用带有随机后缀的自定义名称创建 cloudformation 资源
CF 堆栈模板 附加模板:
MyMacro:
Type: AWS::CloudFormation::Macro
Properties:
Name: 'random-string'
Description: 'random string generator'
FunctionName: 'arn:aws:lambda:eu-west-1:xxxxxx:function:random-string'
CreateSGLambdaExecutionRole:
Type: AWS::IAM::Role
DependsOn: MyMacro
Properties:
RoleName:
*Fn::Transform:
- Name: MyMacro
Parameters:
InputString: ud-sg-MyMacro*
我需要一个像“ud-sg-ABCD123”这样的角色名称。
创建此 CF 堆栈时出现以下错误:
未找到名为 ::MyMacro 的转换。用户请求回滚。
解决方案
推荐阅读
- javascript - 将 onCLick 传递给导入的组件,做出反应
- ios - 如何解决目标 c 中的“预期类型”错误?
- c# - 检测打印机是否仅为文本
- javascript - Javascript 未与 Flask 后端一起运行
- ruby - Travis CI 部署到 AWS ElasticBeanstalk
- java - 如何正确地将快照侦听器添加到 Java 中的 Firebase Firestore 文档引用?
- javascript - 比较日期时给出错误结果的时刻
- node.js - 在 git root 子目录中的 Docker 容器中以 --watch 模式运行 Jest
- python - datetime.datetime.now 在频繁调用时是否返回缓存值?
- google-cloud-platform - GKE:查找集群的发布渠道