Google Cloud- Disk Changes

  1. Create disk using Gcloud command

Format:

gcloud compute disks create <DISK_NAME> --type=<DISK_TYPE> --size=<SIZE> --zone=<ZONE>

Example:

gcloud compute disks create disk-2 –size=100 –zone=us-east1-b

2. Resize disk using Gcloud command

Format:

  gcloud compute disks resize <disk_name> --size=<size> --zone=<zone>

Example:

gcloud compute disks resize disk-2 –size=150 –zone=us-east1-b

3. Attach Disk using Gcloud command:

Format:

gcloud compute instances attach-disk <instance> --disk=<disk_name> --zone=<zone>

Example:

gcloud compute instances attach-disk windows-instance –disk=disk-2 –zone=us-east1-b