Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instance cannot be expunged, only destroyed #24

Closed
vladimirpetrov opened this issue Dec 6, 2021 · 2 comments
Closed

Instance cannot be expunged, only destroyed #24

vladimirpetrov opened this issue Dec 6, 2021 · 2 comments

Comments

@vladimirpetrov
Copy link

When invoking the 'destroy' command to a running VM, it cannot be expunged as well. Which causes other issues, for example the VM's network cannot be destroyed too since it's still connected to the destroyed VM.

Error: Error deleting network TERRAFORM-isolated1: Undefined error: {"errorcode":530,"errortext":"Failed to delete network"}
@harikrishna-patnala
Copy link
Contributor

@vladimirpetrov I see that there is "expunge" param that we can set in terraform VM resource configuration.resource
"cloudstack_instance" "VM1" {
name = "VM1"
service_offering = "Small Instance"
template = cloudstack_template.Template.id
network_id = cloudstack_network.N1.id
zone = "${var.zoneId}"
expunge = true
}

I tried this with destroy command and it expunged the VM. can you please try that as well.

@vladimirpetrov
Copy link
Author

This parameter fixes the problem, closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants