【发布时间】:2020-12-15 06:02:43
【问题描述】:
我正在尝试使用 cfnUpdate 插件通过 jenkins 部署 cloudformation 模板。这是我的 cfnUpdate 代码:
cfnUpdate(stack: ENV_LOWERCASE + "-ecs-windows",
file:'Deploy_DR/WindowsECSCluster.json',
timeoutInMinutes:60,
pollInterval:30000)
WindowsECSCluster.json 是我的 cloudformation 模板。
但是 jenkins 往往会抛出这个错误:
我的 Cloudformation 模板在我在 jenkins 之外执行时有效。它为所有参数输入了默认值。请为它添加任何可能的解决方案。
更新
所以我从cfnUpdate 中删除了pollInterval,现在它似乎显示了原来的错误:
| 2020-08-27 18:34:06.957 | dr-ecs-windows | DELETE_IN_PROGRESS | Parameter validation failed: parameter value default for parameter name AutoScalingGroupSecurityGroups does not exist. Delete requested by u |
cloudformation模板的参数AutoScalingGroupSecurityGroups是一个安全组列表。现在的值是这样的:
"sg-1,sg-2"
类型为"List<AWS::EC2::SecurityGroup::Id>"
我不知道为什么 jenkins 不接受它,即使 cloudformation 在手动运行时正确执行。
【问题讨论】:
-
尝试删除 CF 模板中的一半资源并再次运行它。继续这样做 - 删除或添加东西 - 看看你是否可以隔离它是否是模板中的东西。您可能还想尝试将模板加载到 S3 并将其作为 CF 模板中的 URL 引用。
-
是的,我做到了,它只创建了一个资源。但我仍然遇到同样的错误。 cfnUpdate 的参数“params”是强制性的吗?
-
@Shawn 好的,谢谢..我已经在私有子网内的 ec2 实例中部署了 jenkins...你认为配置与错误有关吗?
标签: amazon-web-services jenkins amazon-cloudformation