menu
arrow_back

Clean up Unused and Orphaned Persistent Disks

Clean up Unused and Orphaned Persistent Disks

1 hour 7 Credits

GSP648

Google Cloud Self-Paced Labs

Overview

In this lab, you will use Cloud Functions and Cloud Scheduler to identify and clean up wasted cloud resources. In this case, you will schedule the Cloud Function to identify and clean up unattached and orphaned persistent disks.

What you'll do

  • Create two persistent disks.
  • Create a VM that uses one of the disks.
  • Detach the disk from the VM.
  • Review the Cloud Function code.
  • Deploy the Cloud Function.
  • Test the Cloud Function by using Cloud Scheduler jobs.

Join Qwiklabs to read the rest of this lab...and more!

  • Get temporary access to the Google Cloud Console.
  • Over 200 labs from beginner to advanced levels.
  • Bite-sized so you can learn at your own pace.
Join to Start This Lab
Score

—/100

Create Persistent Disk

Run Step

/ 10

Create a VM instance with Persistent Disk

Run Step

/ 10

Detach the orphaned disk from the VM

Run Step

/ 10

Deploy the Cloud Function

Run Step

/ 20

Create a Cloud Scheduler task to run the Cloud Function

Run Step

/ 20

Test the job by manually triggering it

Run Step

/ 30