我想在关闭使用 terraform 创建的一堆资源(包括 CloudWatch 日志组)后保留 CloudWatch 日志。有没有办法告诉terraform destroy
节省一些资源?
我想我可以在调用 destroy 之前手动从 tfstate 中删除 CloudWatch 资源,这似乎不是正确的方法。
在cloudformation中,有一个选项retain
删除政策 http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Resources" : {
"myS3Bucket" : {
"Type" : "AWS::S3::Bucket",
"DeletionPolicy" : "Retain"
}
}
}
但在terraform中,我没有找到这种类型生命周期 https://www.terraform.io/docs/configuration/resources.html#lifecycle
您可以在其中搜索或提出新的请求来解决此问题。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)