cloud-ca / terraform-provider-cloudca

Terraform provider for cloud.ca
https://cloud.ca
MIT License
8 stars 10 forks source link

Changing the template of an instance with volumes attached in terraform fails #16

Closed franzpgarcia closed 7 years ago

franzpgarcia commented 7 years ago

It calls the update on the volumes and tries to detach the volume but the instance has been destroyed. ex: cloudca_volume.data_volume_43_2: Modifying... instance_id: "c6cfd6a4-ee15-4d86-b17d-7dade9c95ff1" => "de0518ef-81c6-427e-958f-64aa3170495a" cloudca_volume.data_volume_43_4: Modifying... instance_id: "c6cfd6a4-ee15-4d86-b17d-7dade9c95ff1" => "de0518ef-81c6-427e-958f-64aa3170495a" cloudca_volume.data_volume_43_3: Modifying... instance_id: "c6cfd6a4-ee15-4d86-b17d-7dade9c95ff1" => "de0518ef-81c6-427e-958f-64aa3170495a" cloudca_volume.data_volume_43: Modifying... instance_id: "c6cfd6a4-ee15-4d86-b17d-7dade9c95ff1" => "de0518ef-81c6-427e-958f-64aa3170495a"

simongodard commented 7 years ago

@franzpgarcia: is there a way we could detach the volumes before the delete instance and attach them back after the instance is created again?

simongodard commented 7 years ago

Sorry I closed the issue by accident...

franzpgarcia commented 7 years ago

The issue is that on the destroy instance you don't have access to the state of a volume.