Setting up a cloud environment
Before you touch any GCP resource you need the right structure underneath it: an Organisation, Folders, Projects, and Billing Accounts, all tied together with Identity and Access Management (IAM).
The resource hierarchy
- Organisation sits at the top, tied to a Google Workspace or Cloud Identity domain.
- Folders group Projects (eg by department or environment) and can be nested inside other Folders.
- Projects are the base-level container for all resources - every resource belongs to exactly one Project.
- Every Project has three identifiers: a Project ID (globally unique, immutable, user-chosen or auto-generated), a Project Name (mutable, not unique), and a Project Number (auto-assigned, immutable, globally unique).
- IAM policies set higher in the hierarchy (Org or Folder) are inherited downward and combined with policies set lower down - permissions only ever add up, they never get revoked by a lower-level policy.
Billing
- A Billing Account must be linked to a Project before you can create billable resources.
- Billing Accounts are either self-serve (credit card, individual) or invoiced (for larger organisations).
- One Billing Account can fund multiple Projects; use Budgets and Alerts to get notified at set spend thresholds (they warn - they do not automatically stop billing).
- Billing export to BigQuery is the standard way to analyse detailed cost data.
Setting up access - the gcloud CLI and Cloud SDK
- Install the Cloud SDK, then run 'gcloud init' to authenticate and set your default Project, region and zone.
- 'gcloud auth login' authenticates a human user; 'gcloud auth application-default login' sets credentials for local apps/SDKs to use (Application Default Credentials).
- Service accounts authenticate via a downloaded JSON key or, better, attached identity (no key file) - avoid exporting keys where possible, it is a common exam trap and a real security risk.
Regions, zones, and quotas
- A region is a specific geographical location (eg europe-west2); a zone is an isolated deployment area within a region (eg europe-west2-a). Zones in the same region have low-latency, high-bandwidth links.
- Resources are zonal, regional, or global - Compute Engine VMs and disks are zonal; some load balancers are global.
- Every Project starts with default quotas (eg CPUs per region) - these are soft limits you can request increases for via the console, they are not hard architectural ceilings.
Common mistakes
- Forgetting that a new Project has no Billing Account linked, so API calls fail with a billing error.
- Confusing Project ID with Project Number in scripts and Terraform.
- Assuming IAM roles granted at Project level also need re-granting at Folder level - they are already inherited.
- Leaving default 'Editor' role assigned to service accounts instead of scoping to least-privilege predefined or custom roles.
What are the four levels of the GCP resource hierarchy, top to bottom?
Organisation, Folder, Project, Resource.
tap to reveal
Which Project identifier is globally unique and immutable but chosen by the user at creation?
Project ID.
tap to reveal
Which Project identifier is auto-assigned by Google and never changes?
Project Number.
tap to reveal
Do IAM permissions set at a higher level in the hierarchy get overridden by a more restrictive policy lower down?
No - IAM is additive; permissions inherited from above are combined with, not revoked by, lower-level policies.
tap to reveal
What must be linked to a Project before you can create billable resources?
A Billing Account.
tap to reveal
Can one Billing Account fund multiple Projects?
Yes.
tap to reveal
Do Budget Alerts automatically stop billing when a threshold is hit?
No - they only send a notification; you must act on it or set up separate automation to stop spend.
tap to reveal
What command authenticates the gcloud CLI and sets default Project, region and zone?
gcloud init.
tap to reveal
What is the difference between 'gcloud auth login' and 'gcloud auth application-default login'?
'auth login' authenticates you as a human user for gcloud commands; 'application-default login' sets Application Default Credentials for local apps and SDKs to use.
tap to reveal
What is the relationship between a region and a zone?
A region is a geographic area (eg europe-west2) made up of multiple isolated zones (eg europe-west2-a) with low-latency, high-bandwidth connections between them.
tap to reveal
Are Compute Engine VMs zonal, regional, or global resources?
Zonal.
tap to reveal
Are default GCP quotas (eg CPUs per region) hard architectural limits?
No - they are soft limits you can request an increase for via the console.
tap to reveal
What is the more secure alternative to downloading a service account JSON key?
Attaching the service account identity directly to the resource (no exported key file).
tap to reveal
Can Folders be nested inside other Folders?
Yes.
tap to reveal
Where does Google recommend exporting detailed billing data for analysis?
BigQuery, via billing export.
tap to reveal