简体   繁体   English

如何使用Terraform为OpenStack启用实例终止保护?

[英]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.

相关问题 使用Terraform将OpenStack安全组添加到不受Terraform管理的实例 - Using Terraform to add OpenStack Security Group to instance not managed by Terraform 如何使用 Terraform 在 Openstack 实例上添加非根 ssh 密钥? - How to add a non-root ssh-key on Openstack instance using Terraform? 无法从Terraform启动Openstack实例 - Not able to launch the Openstack instance from Terraform 如何使用 Terraform 从 Openstack 获取公钥并将其保存在本地? - How to obtain public key from Openstack using Terraform and save it locally? 如何使用Jcloud API在特定端口上创建OpenStack VM实例 - How to create an openstack VM instance on a specific port using jcloud api 如何在不使用浮动 IP 的情况下直接访问 OPENSTACK 实例 - How to reach a OPENSTACK instance directly without using floating IP 如何使用KVM和libvirt重设openstack实例的密码? - How to reset password of openstack instance using KVM and libvirt? 如何使用novaclient获取openstack实例的固定IP地址 - How to get fixed IP address of openstack instance using novaclient 如何在Openstack上使用Terraform创建具有多个NIC的VM - How to create a VM with multiple NICs with Terraform on Openstack Terraform OpenStack实例不返回浮动IP - Terraform openstack instance doesn't return floating ip
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM