0
0
GCPcloud~20 mins

Compute commands (instances, disks) in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
Manage Compute Instances and Disks with GCP Commands
📖 Scenario: You are managing virtual machines and storage disks in Google Cloud Platform (GCP) for a small project. You need to create instances and disks, configure them, and attach disks to instances using GCP command-line tools.
🎯 Goal: Learn to use GCP gcloud compute commands to create instances and disks, configure disk size, and attach disks to instances.
📋 What You'll Learn
Create a compute instance named web-server in zone us-central1-a
Create a persistent disk named web-disk with size 100GB in zone us-central1-a
Attach the disk web-disk to the instance web-server
Use exact command syntax with gcloud compute instances and gcloud compute disks
💡 Why This Matters
🌍 Real World
Managing virtual machines and storage disks is a common task in cloud infrastructure to run applications and store data.
💼 Career
Cloud engineers and system administrators use these commands daily to provision and manage resources in Google Cloud Platform.
Progress0 / 4 steps
1
Create a Compute Instance
Use the gcloud compute instances create command to create an instance named web-server in zone us-central1-a.
GCP
Need a hint?

Use gcloud compute instances create INSTANCE_NAME --zone=ZONE format.

2
Create a Persistent Disk
Use the gcloud compute disks create command to create a persistent disk named web-disk with size 100GB in zone us-central1-a.
GCP
Need a hint?

Use gcloud compute disks create DISK_NAME --size=SIZE --zone=ZONE.

3
Attach Disk to Instance
Use the gcloud compute instances attach-disk command to attach the disk web-disk to the instance web-server in zone us-central1-a.
GCP
Need a hint?

Use gcloud compute instances attach-disk INSTANCE_NAME --disk=DISK_NAME --zone=ZONE.

4
Verify Instance and Disk Setup
Add the command to list all instances in zone us-central1-a to verify the instance web-server is created and the disk is attached.
GCP
Need a hint?

Use gcloud compute instances list --zones=ZONE to see instances in a zone.