如何查看给定 CloudFormation 资源的 DeletionPolicy? [英] How do I view the DeletionPolicy on a given CloudFormation resource?
问题描述
我创建了一个 CloudFormation 堆栈,然后使用变更集更新它以将 DeletionPolicy 更改为 Retain.
I created a CloudFormation stack and then updated it using a changeset to change DeletionPolicy to Retain.
有没有办法查看实时堆栈中资源的 DeletionPolicy 以判断它是否设置正确?
Is there any way to view the DeletionPolicy on a resource in a live stack to tell whether it was set correctly?
推荐答案
describe-stack-resource 当前不返回 DeletionPolicy
阅读DeletionPolicy
文档 获取默认 DeletionPolicy
值,在模板本身搜索 DeletionPolicy
覆盖,并确保您的 CloudFormation stack status 达到了您预期的状态(可能是 CREATE_COMPLETE
/UPDATE_COMPLETE
)
Read the DeletionPolicy
documentation for default DeletionPolicy
values, search the template itself for DeletionPolicy
overrides, and ensure your CloudFormation stack status reached the status you were expecting (probably CREATE_COMPLETE
/ UPDATE_COMPLETE
)
这篇关于如何查看给定 CloudFormation 资源的 DeletionPolicy?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!