Open
Description
Describe the bug
When we try to destroy the resource vcd_inserted_media we need to do a human intervention to answer Yes to force the ejection.
But on Terraform side the intervention seems to be ok
vcd_inserted_media.example: Refreshing state... [id=vapp_test3_TestRomain_debian-9.9.0-amd64-netinst.iso]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
- destroy
Terraform will perform the following actions:
# vcd_inserted_media.example will be destroyed
- resource "vcd_inserted_media" "example" {
- catalog = "my-catalog_romain" -> null
- eject_force = true -> null
- id = "vapp_test3_TestRomain_debian-9.9.0-amd64-netinst.iso" -> null
- name = "debian-9.9.0-amd64-netinst.iso" -> null
- vapp_name = "vapp_test3" -> null
- vm_name = "TestRomain" -> null
}
Plan: 0 to add, 0 to change, 1 to destroy.
Do you really want to destroy all resources?
Terraform will destroy all your managed infrastructure, as shown above.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value: yes
vcd_inserted_media.example: Destroying... [id=vapp_test3_TestRomain_debian-9.9.0-amd64-netinst.iso]
vcd_inserted_media.example: Still destroying... [id=vapp_test3_TestRomain_debian-9.9.0-amd64-netinst.iso, 10s elapsed]
vcd_inserted_media.example: Destruction complete after 11s
Destroy complete! Resources: 1 destroyed.
However side UI vCloud Director, you need to make an action:
And give a answer normally manage by the option eject_force.
Reproduction steps
- Create a VM and power on VM
- Make a terraform apply with resource "vcd_inserted_media" "example"
- Destroy terraform resource "vcd_inserted_media"
- check result on vCloud Director UI
Expected behavior
The attribute eject_force (to true by default) bypass the human intervention.
Additional context
terraform version
Terraform v1.3.9
on linux_amd64
+ provider registry.terraform.io/vmware/vcd v3.8.2
On Api vcloud director 37.0