0
0
GCPcloud~30 mins

Projects as organizational units in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
Organizing Cloud Resources with GCP Projects
📖 Scenario: You are managing cloud resources for a small company. To keep things organized, you want to create a Google Cloud Platform (GCP) project that will act as a container for all related resources like virtual machines, storage buckets, and databases.
🎯 Goal: Create a GCP project with a specific project ID and name, set a billing account, and enable the Compute Engine API to prepare the project for resource deployment.
📋 What You'll Learn
Create a GCP project with the exact project ID my-sample-project-123 and name My Sample Project
Set the billing account ID to 000000-000000-000000 for the project
Enable the Compute Engine API for the project
💡 Why This Matters
🌍 Real World
Cloud projects in GCP act like folders or containers to organize resources, billing, and permissions. Setting up projects correctly is the first step in managing cloud infrastructure.
💼 Career
Cloud engineers and DevOps professionals regularly create and manage projects to keep cloud resources organized, secure, and cost-controlled.
Progress0 / 4 steps
1
Create the GCP project resource
Write a Terraform resource block named google_project with the resource name my_project. Set the project_id to "my-sample-project-123" and the name to "My Sample Project".
GCP
Need a hint?

Use the resource keyword with google_project and set the project_id and name exactly as specified.

2
Add billing account configuration
Add the billing_account attribute to the existing google_project.my_project resource. Set it to the exact string "000000-000000-000000".
GCP
Need a hint?

Add the billing_account attribute inside the google_project.my_project resource block with the exact billing account ID.

3
Enable the Compute Engine API
Create a Terraform resource block named google_project_service with the resource name compute_api. Set the project attribute to google_project.my_project.project_id and the service attribute to "compute.googleapis.com".
GCP
Need a hint?

Use google_project_service resource to enable the Compute Engine API for the project.

4
Add project labels for organization
Add a labels block inside the google_project.my_project resource. Set the label environment to "development" and team to "cloudops".
GCP
Need a hint?

Use the labels map inside the project resource to add organizational tags.