You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Error applying plan:
2 error(s) occurred:
* digitalocean_volume.hcmc_db: 1 error(s) occurred:
* digitalocean_volume.hcmc_db: Error creating Volume: POST https://api.digitalocean.com/v2/volumes: 409 (request "94fbb17b-b2a3-453c-a1d3-afb4d16b80ab") failed to create volume
* digitalocean_volume.hcmc_admin (destroy): 1 error(s) occurred:
* digitalocean_volume.hcmc_admin: Error deleting volume: DELETE https://api.digitalocean.com/v2/volumes/fddc7fbd-4b70-11e8-a456-0242ac116408: 409 A volume that's attached to a Droplet cannot be deleted. Please detach it first before deleting.
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
Expected Behavior
After changing digitalocean_volume name terraform should:
detach the old volume
delete the old volume
create the new volume
attach the new volume
Actual Behavior
Terraform trying to delete volume before detaching it from the droplet.
* digitalocean_volume.hcmc_admin: Error deleting volume: DELETE https://api.digitalocean.com/v2/volumes/fddc7fbd-4b70-11e8-a456-0242ac116408: 409 A volume that's attached to a Droplet cannot be deleted. Please detach it first before deleting.
Steps to Reproduce
terraform init
terraform apply
rename digitalocean_volume name foo -> bar
terraform apply
Apply log
digitalocean_volume.foo: Refreshing state... (ID: 7bd24a9e-4b73-11e8-8a8f-0242ac115908)
digitalocean_ssh_key.default: Refreshing state... (ID: 20353441)
digitalocean_droplet.droplet1: Refreshing state... (ID: 91509324)
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
~ update in-place
- destroy
Terraform will perform the following actions:
~ digitalocean_droplet.droplet1
volume_ids.#: "1" => <computed>
+ digitalocean_volume.bar
id: <computed>
droplet_ids.#: <computed>
name: "foo"
region: "ams3"
size: "1"
- digitalocean_volume.foo
Plan: 1 to add, 1 to change, 1 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
digitalocean_volume.foo: Destroying... (ID: 7bd24a9e-4b73-11e8-8a8f-0242ac115908)
digitalocean_volume.bar: Creating...
droplet_ids.#: "" => "<computed>"
name: "" => "foo"
region: "" => "ams3"
size: "" => "1"
Error: Error applying plan:
2 error(s) occurred:
* digitalocean_volume.bar: 1 error(s) occurred:
* digitalocean_volume.bar: Error creating Volume: POST https://api.digitalocean.com/v2/volumes: 409 (request "708463e7-7fda-4d75-9b87-9d41537abc75") failed to create volume
* digitalocean_volume.foo (destroy): 1 error(s) occurred:
* digitalocean_volume.foo: Error deleting volume: DELETE https://api.digitalocean.com/v2/volumes/7bd24a9e-4b73-11e8-8a8f-0242ac115908: 409 A volume that's attached to a Droplet cannot be deleted. Please detach it first before deleting.
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
The text was updated successfully, but these errors were encountered:
This issue was originally opened by @ksanderer as hashicorp/terraform#17964. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform Configuration Files
https://gist.github.com/ksanderer/30b6d0edd3518ea0a49088a795a5c9a7
Crash Output
Expected Behavior
After changing
digitalocean_volume
name terraform should:Actual Behavior
Terraform trying to delete volume before detaching it from the droplet.
Steps to Reproduce
terraform init
terraform apply
digitalocean_volume
namefoo -> bar
terraform apply
Apply log
The text was updated successfully, but these errors were encountered: