ovh / terraform-provider-ovh

Terraform OVH provider
https://registry.terraform.io/providers/ovh/ovh/latest/docs
Mozilla Public License 2.0
182 stars 136 forks source link

[BUG] Impossible to terraform apply if an instance is in rescue #632

Closed vparpoil closed 4 months ago

vparpoil commented 4 months ago

If an instance is in rescue, terraform apply gives the following output :

│ Error: Invalid power_state for instance RETRACTED: RESCUE
│ 
│   with openstack_compute_instance_v2.RETRACTED[0],
│   on main.tf line 113, in resource "openstack_compute_instance_v2" "RETRACTED":
│  113: resource "openstack_compute_instance_v2" "RETRACTED" {
amstuta commented 4 months ago

Hello @vparpoil, could you share the config you use and the actions you took (for ex, how did your instance end up in rescue) ?

vparpoil commented 4 months ago
amstuta commented 4 months ago

OK, after digging a bit it seems that you can't put your instance in rescue mode from Terraform using the openstack provider, so you can't do the reverse either (re-activate the instance). So in your case you will have to reboot your instance from the OVH manager to be able to terraform apply again.

I invite you to open an issue directly on the Openstack provider repository if you think this behavior should be changed.