ValidationError Stack:arn aws cloudformation 堆栈处于 ROLLBACK_COMPLETE 状态且无法更新 [英] ValidationError Stack:arn aws cloudformation stack is in ROLLBACK_COMPLETE state and can not be updated
问题描述
当我使用 cloudformation 部署时 aws cloudformation deploy --region $region --stack-name ABC
When I deploy using cloudformation aws cloudformation deploy --region $region --stack-name ABC
出现错误:
调用 CreateChangeSet 时发生错误 (ValidationError)手术:Stack:arn:aws:cloudformation:stack/service/7e1d8c70-d60f-11e9-9728-0a4501e4ce4c处于 ROLLBACK_COMPLETE 状态,无法更新.
An error occurred (ValidationError) when calling the CreateChangeSet operation: Stack:arn:aws:cloudformation:stack/service/7e1d8c70-d60f-11e9-9728-0a4501e4ce4c is in ROLLBACK_COMPLETE state and can not be updated.
请帮帮我!
推荐答案
当堆栈创建失败时会发生这种情况.默认情况下,堆栈将保持原位,状态为 ROLLBACK_COMPLETE
.这意味着它已成功回滚(删除)堆栈创建的所有资源.唯一剩下的就是空堆栈本身.您无法更新此堆栈;您必须手动删除它,之后您可以尝试再次部署它.
This happens when stack creation fails. By default the stack will remain in place with a status of ROLLBACK_COMPLETE
. This means it's successfully rolled back (deleted) all the resources which the stack had created. The only thing remaining is the empty stack itself. You cannot update this stack; you must manually delete it, after which you can attempt to deploy it again.
如果您设置了失败回滚"在控制台中禁用(或在 CLI 命令中将 --on-failure
设置为 DO_NOTHING
,如果使用 create-stack
),堆栈创建失败将导致 CREATE_FAILED
的状态.在故障点之前创建的任何资源都不会回滚.
If you set "Rollback on failure" to disabled in the console (or set --on-failure
to DO_NOTHING
in the CLI command, if using create-stack
), stack creation failure will instead result in a status of CREATE_FAILED
. Any resources created before the point of failure won't have been rolled back.
如果相反,您将更新部署到现有(已成功创建)堆栈,并且更新失败但成功回滚,则它将返回其先前的有效状态(状态为 UPDATE_ROLLBACK_COMPLETE
),允许您重新尝试更新.
If instead you were deploying updates to an existing (successfully created) stack, and the updates failed but were successfully rolled back, it will go back into its previous valid state (with a status of UPDATE_ROLLBACK_COMPLETE
), allowing you to reattempt updates.
正如@SteffenOpel 指出的那样,您现在可以通过设置 --on-failure
选项(仅用于 create-stack
,而不是 deploy
) 到 CLI 中的 DELETE
.在撰写本文时 (13/11/20),此选项在控制台中尚不可用.
As @SteffenOpel points out, you can now specify that a stack should be deleted on failure by setting the --on-failure
option (for create-stack
only, not deploy
) to DELETE
in the CLI. This option is not yet available in the console at the time of writing (13/11/20).
这篇关于ValidationError Stack:arn aws cloudformation 堆栈处于 ROLLBACK_COMPLETE 状态且无法更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!