【发布时间】:2019-05-01 18:35:33
【问题描述】:
我正在尝试使用嵌套堆栈,当我的 ChangeSet 正在执行时,我收到了这个错误:
Requires capabilities : [CAPABILITY_AUTO_EXPAND]
我用 cloudformation 创建了一个管道。
这可用于创建管道:
Configuration:
ActionMode: CHANGE_SET_REPLACE
ChangeSetName: changeset
RoleArn: ??
Capabilities: CAPABILITY_IAM
StackName: appsync-graphql
TemplatePath: BuildArtifact::output.yaml
这不能:
Configuration:
ActionMode: CHANGE_SET_REPLACE
ChangeSetName: changeset
RoleArn: ??
Capabilities:
- CAPABILITY_IAM
- CAPABILITY_AUTO_EXPAND
StackName: appsync-graphql
TemplatePath: BuildArtifact::output.yaml
错误是:“属性配置的值必须是具有字符串(或简单类型)属性的对象”
这是我找到的最接近的文档:https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStack.html
上面写着:Type: Array of strings for capabilites,aws cli 文档也有类似的说法,但没有给出示例。
所以我没有什么想法可以尝试拥有 CAPABILITY_AUTO_EXPAND 功能。
【问题讨论】:
-
在我的代码管道模板中: 1.
capabilities: - CAPABILITY_AUTO_EXPAND - CAPABILITY_IAM=> 我无法部署管道。错误:“属性配置的值必须是具有字符串(或简单类型)属性的对象” -
2.
capabilities: 'CAPABILITY_AUTO_EXPAND CAPABILITY_IAM'我可以部署管道,但是当它创建变更集时,出现错误:JobFailed 检测到 1 个验证错误:“功能”处的值“[CAPABILITY_IAM CAPABILITY_AUTO_EXPAND]”未能满足约束:成员必须满足约束:[成员必须满足枚举值集:[CAPABILITY_AUTO_EXPAND,CAPABILITY_NAMED_IAM,CAPABILITY_IAM]](服务:AmazonCloudFormation;状态代码:400;错误代码:ValidationError;) -
我有同样的问题,我被卡住了。感谢您报告您的结果。
标签: amazon-cloudformation aws-codepipeline