简体   繁体   English

嵌套 CloudFormation 堆栈回滚

[英]Nested CloudFormation Stack Rollback

In a Nested Stack setup -在嵌套堆栈设置中 -

  1. I have the following - Root Stack, Nested Stack 1, Nested Stack 2.我有以下 - 根堆栈,嵌套堆栈 1,嵌套堆栈 2。
  2. Nested Stack 2 is referencing an output variable from Nested Stack 1嵌套堆栈 2 正在引用来自嵌套堆栈 1 的 output 变量

Question: If my Nested Stack 1 is successfully created, but Nested Stack 2 encounters an issue, both the stacks are rolled back.问:如果我的嵌套堆栈 1 已成功创建,但嵌套堆栈 2 遇到问题,则两个堆栈都会回滚。 Is there a way only the failed stack is rolled back?有没有办法只回滚失败的堆栈?

Sadly there is not.可悲的是没有。 Parent stack + nested stacks are considered as a one entity .父堆栈+嵌套堆栈被视为一个实体 If anything fails, everything is rolled back.如果有任何失败,一切都会回滚。

If you want to have them be separate, then do not nest your stacks.如果你想让它们分开,那么不要嵌套你的堆栈。 Instead extract nested resources to their own stacks and export their outputs , so that other stacks can import them.而是将嵌套资源提取到自己的堆栈中并导出它们的输出,以便其他堆栈可以导入它们。 Alternatively, pass the outputs as inputs to the other stacks.或者,将输出作为输入传递给其他堆栈。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM