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

[Provider: google-cloud] deleting an attached disk should not be possible #18898

Closed
jeff-knurek opened this issue Sep 19, 2018 · 2 comments
Closed

Comments

@jeff-knurek
Copy link

There seems to be enough issues in the past regarding disks that are attached and not being able to properly manage desired state:
#7792
#12760
#12398

But if I run: gcloud compute disks delete DISKNAME
I get the following error from Google:

The following disks will be deleted:
 - [DISKNAME] in [ZONE]

Do you want to continue (Y/n)?  y

ERROR: (gcloud.compute.disks.delete) Could not fetch resource:
 - The disk resource 'projects/-/zones/-/disks/DISKNAME' is already being used by 'projects/-/zones/-/instances/gke-0c4z....'

However, if I comment out the disk configuration in terraform and run apply,

Terraform will perform the following actions:
- module.-.module.-.google_compute_disk.disk
....
Apply complete! Resources: 0 added, 0 changed, 1 destroyed.

This then leaves everything that was attached to it in a strange state of not being able to connect.

My expected behaviour is to see the same error message that the gcloud command outputs.

@ghost
Copy link

ghost commented Sep 19, 2018

This issue has been automatically migrated to hashicorp/terraform-provider-google#2078 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-google#2078.

@ghost ghost closed this as completed Sep 19, 2018
@ghost
Copy link

ghost commented Apr 2, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants