smutel / terraform-provider-netbox

Terraform provider for Netbox
ISC License
58 stars 19 forks source link

VCPUs is not removed #152

Closed smutel closed 1 year ago

smutel commented 1 year ago

Summary

When we would like to remove the cpu of a virtual machine, it does not work.

Version

Netbox version

3.2.9

Terraform version

v1.2.9

Provider version

5.1.0

Issue details

Affected Data(s) / Resource(s)

Terraform Configuration Files

resource "netbox_virtualization_vm" "vm_test" {                                                     
  cluster_id  = data.netbox_virtualization_cluster.cluster_test.id                                  
  name        = "test"                                                                              
  disk        = 10                                                                                  
  memory      = 10                                                                                  
  vcpus       = 2
  ...

Behaviors

Actual Behavior

If a virtual machine has been created with CPU, it's not possible to remove it with terraform.

Expected Behavior

Able to remove the CPU with terraform.

Steps to Reproduce

  1. terraform apply
  2. Remove vcpus parameter
  3. terraform apply