[英]How to enable instance termination protection for OpenStack using terraform?
I'm trying to enable instance termination protection using terraform. 我正在尝试使用terraform启用实例终止保护。 But did not see any arguments for openstack like what I found for AWS 'disable_api_termination'. 但是没有看到像我在AWS'disable_api_termination'中找到的openstack的任何参数。
I think you need a different mechanism to manage that. 我认为您需要一种不同的机制来进行管理。 Terraform doesn't have option to disable termination like it is implemented for AWS. Terraform没有像AWS那样实现终止终止的选项。 Those options are tailored after the provider APIs. 这些选项是根据提供程序API定制的。 I'm guessing that OpenStack just doesn't have something similar to this behavior. 我猜想OpenStack就没有与此行为类似的东西。
To prevent some confusion I want to mention that the Terraform's lifecycle documented here won't be of much good in this regard: 为了避免造成混淆,我想提一下,此处记录的Terraform的生命周期在这方面不会有多大好处:
https://www.terraform.io/docs/configuration/resources.html#prevent_destroy https://www.terraform.io/docs/configuration/resources.html#prevent_destroy
It will disallow you to destroy it using 'terraform destroy' and the likes but won't do much in terms of protection coming from the OpenStack provider itself. 它将不允许您使用“ terraform destroy”之类的方法销毁它,但是就OpenStack提供程序本身提供的保护而言,它不会做太多事情。
I would rather think about solving this problem in the architectural layer. 我宁愿考虑在体系结构层中解决此问题。 Think about how you call the OpenStack API and how you manage your services. 考虑一下如何调用OpenStack API以及如何管理服务。 Around those steps you can probably place an additional layer or step that will manage the lifecycle and keep mistakes down to the minimum. 在这些步骤周围,您可能可以放置一个额外的层或步骤来管理生命周期,并将错误降至最低。 Your process is what could protect you better than any tool. 您的流程比任何工具都能更好地保护您。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.