ionos-cloud / terraform-provider-ionoscloud

The IonosCloud Terraform provider gives the ability to deploy and configure resources using the IonosCloud APIs.
Mozilla Public License 2.0
35 stars 24 forks source link

Taint of the ionoscloud_server resource dosn't remove the old volume Instead its dangling around without server #399

Closed mueller-tobias closed 1 year ago

mueller-tobias commented 1 year ago

Description

Today during tests i had to rebuild a vm. I tainted the ionoscloud_server resource. With the next apply, terraform destroys the old server and nic and creates a new nic, a new volume and a new server. But it dosn't create the old volume. The old volumes will be dangling around in the dcd without a server attached to it. I would expect that when i taint the resource, the volume is deleted and recreated as well.

Expected behavior

Taint a ionoscloud_server will also delete and recreate the current disk volume and not preserve the volume without any server

Environment

Terraform version:

Terraform v1.5.0

Provider version:

+ provider registry.terraform.io/hashicorp/cloudinit v2.3.2
+ provider registry.terraform.io/hashicorp/local v2.4.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
+ provider registry.terraform.io/hashicorp/tls v4.0.4
+ provider registry.terraform.io/ionos-cloud/ionoscloud v6.4.0

OS:

Ubuntu 20.04

Configuration Files

How to Reproduce

  1. Create a ionoscloud_server
  2. Taint the resource
  3. Find the dangling volume from the original deployment

References

server resource

cristiGuranIonos commented 1 year ago

should be fixed in v6.4.1