You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Now that you understand the fundamentals of Google Cloud — the global infrastructure, resource hierarchy, management tools, billing, and support — it is time to put that knowledge into practice. This lesson walks you through creating your first GCP project, enabling APIs, deploying resources, and following best practices from the start.
A project is the fundamental organising unit in GCP. Every resource you create must belong to a project. Here is how to create one:
# Create a new project
gcloud projects create my-first-project \
--name="My First GCP Project"
# Set it as the active project
gcloud config set project my-first-project
| Convention | Example |
|---|---|
| Include environment | prod-api, dev-data-pipeline, staging-web |
| Include team or function | eng-backend, ds-ml-platform, ops-monitoring |
| Use hyphens, not underscores | my-project (not my_project) |
| Keep it descriptive but concise | prod-payment-service |
Before you can create resources that cost money, your project must be linked to a billing account.
# Link a billing account to a project
gcloud billing projects link my-first-project \
--billing-account=BILLING_ACCOUNT_ID
If you are using the Free Trial, your billing account is created automatically with the $300 credit.
GCP requires you to enable APIs before you can use them. This is a security and governance feature — only the APIs you explicitly enable are available in your project.
# Enable the Compute Engine API
gcloud services enable compute.googleapis.com
# Enable multiple APIs at once
gcloud services enable \
compute.googleapis.com \
storage.googleapis.com \
bigquery.googleapis.com
# List enabled APIs
gcloud services list --enabled
| API | Purpose |
|---|---|
compute.googleapis.com | Compute Engine (VMs) |
storage.googleapis.com | Cloud Storage |
bigquery.googleapis.com | BigQuery |
container.googleapis.com | Google Kubernetes Engine |
cloudfunctions.googleapis.com | Cloud Functions |
run.googleapis.com | Cloud Run |
sqladmin.googleapis.com | Cloud SQL |
iam.googleapis.com | Identity and Access Management |
Let us deploy a simple Compute Engine virtual machine:
my-first-vmus-central1us-central1-ae2-micro (eligible for Always Free)# Create a Compute Engine instance
gcloud compute instances create my-first-vm \
--zone=us-central1-a \
--machine-type=e2-micro \
--image-family=debian-12 \
--image-project=debian-cloud
# SSH into the instance
gcloud compute ssh my-first-vm --zone=us-central1-a
# List all instances
gcloud compute instances list
# Stop the instance (to save costs)
gcloud compute instances stop my-first-vm --zone=us-central1-a
# Delete the instance (when you no longer need it)
gcloud compute instances delete my-first-vm --zone=us-central1-a
Even for a personal project, good IAM practices from the start will serve you well:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.