mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-01 16:21:06 +00:00
Fix wrong field name in detach_disk (#3269)
<!-- This change is generated by MagicModules. --> /cc @rileykarson
This commit is contained in:
parent
6cbd6146a3
commit
01e7a95eab
@ -768,8 +768,8 @@ func resourceComputeDiskDelete(d *schema.ResourceData, meta interface{}) error {
|
||||
return handleNotFoundError(err, d, fmt.Sprintf("ComputeDisk %q", d.Id()))
|
||||
}
|
||||
|
||||
// if disks are attached, they must be detached before the disk can be deleted
|
||||
if v, ok := readRes["instances"].([]interface{}); ok {
|
||||
// if disks are attached to instances, they must be detached before the disk can be deleted
|
||||
if v, ok := readRes["users"].([]interface{}); ok {
|
||||
type detachArgs struct{ project, zone, instance, deviceName string }
|
||||
var detachCalls []detachArgs
|
||||
|
||||
|
@ -503,8 +503,8 @@ func resourceComputeRegionDiskDelete(d *schema.ResourceData, meta interface{}) e
|
||||
return handleNotFoundError(err, d, fmt.Sprintf("ComputeDisk %q", d.Id()))
|
||||
}
|
||||
|
||||
// if disks are attached, they must be detached before the disk can be deleted
|
||||
if v, ok := readRes["instances"].([]interface{}); ok {
|
||||
// if disks are attached to instances, they must be detached before the disk can be deleted
|
||||
if v, ok := readRes["users"].([]interface{}); ok {
|
||||
type detachArgs struct{ project, zone, instance, deviceName string }
|
||||
var detachCalls []detachArgs
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user