vmware / terraform-provider-avi

Terraform AVI Networks provider
https://registry.terraform.io/providers/vmware/avi/
Mozilla Public License 2.0
31 stars 32 forks source link

Resource avi_cluster fails on destroy #593

Open cneu-bc opened 7 months ago

cneu-bc commented 7 months ago

Describe the bug

We are running version 22.1.6 of the provider (matching the deployed AVI version).

When running terraform destroy the avi_cluster resource fails to be destroyed returning the error message

Encountered an error on DELETE request to URL https://192.168.0.213/api/cluster/cluster-f2bf8b9d-fa77-41c6-bf84-5409aed50b02: HTTP code: 405; error from Controller: map[detail:Method 'DELETE' not allowed.]

Reproduction steps

using https://github.com/vmware/terraform-provider-avi/tree/eng/examples/vmware/vsphere_steps/04_avi_cluster

  1. run terraform apply
  2. run terraform destroy

Expected behavior

The avi_cluster resource does not issue a DELETE request to the AVI API, as this is not allowed. The avi_cluster resource in terraform is removed and not throwing an error.

Additional context

No response