All exams← All Google Associate Cloud Engineer notes

Setting up a cloud environment: Google Associate Cloud Engineer revision notes

Revision notes

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.

Key facts

Flashcards

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
Practice questions

Setting up a cloud environment: 5 practice questions

Q1. In the Google Cloud resource hierarchy, which resource sits directly above projects and is typically used to group projects belonging to different departments or teams?
  • A.  Organization node
  • B.  Folder
  • C.  Billing account
  • D.  Resource label
Show answer & explanation
✓ Answer: B. Folder
Folders sit between the Organization node and Projects, letting you group projects (for example by department or environment) and apply IAM policies or org policies at that level. The Organization node is the root, and billing accounts and labels are not hierarchy containers.
Q2. A company wants every new Google Cloud project to automatically be billed to the same billing account without manual linking each time. Which approach achieves this?
  • A.  Create a Cloud Function that polls for new projects and links billing manually
  • B.  Enable Cloud Billing budgets on the account
  • C.  Set the billing account as the default for the Cloud Identity/organization so new projects auto-link to it
  • D.  Grant the Billing Account Administrator role to every new project's owner
Show answer & explanation
✓ Answer: C. Set the billing account as the default for the Cloud Identity/organization so new projects auto-link to it
When an organization has a billing account configured as default, projects created under that organization can be automatically linked to it, removing the manual step. Budgets only alert on spend, and granting a role does not itself link billing.
Q3. Which Google Cloud IAM role provides the minimum permissions needed to link and unlink a project to a billing account, without permission to view detailed cost data?
  • A.  Billing Account User combined with Project Owner or Editor on the project
  • B.  Billing Account Administrator
  • C.  Billing Account Viewer
  • D.  Organization Administrator
Show answer & explanation
✓ Answer: A. Billing Account User combined with Project Owner or Editor on the project
To link a project to a billing account you need the Billing Account User role on the billing account plus a role like Owner/Editor (or Project Billing Manager) on the project. Billing Account Administrator grants broader control including managing payment settings, which is more than the minimum needed.
Q4. A developer runs 'gcloud config set project my-project-id' but subsequent commands still act on the wrong project. What is the most likely cause?
  • A.  gcloud caches project IDs for 24 hours before applying changes
  • B.  The developer must also run 'gcloud auth login' after every config change
  • C.  An active named configuration is overriding the default configuration's project value
  • D.  Project IDs longer than 20 characters are rejected silently
Show answer & explanation
✓ Answer: C. An active named configuration is overriding the default configuration's project value
gcloud supports multiple named configurations, and if a different configuration is currently active, 'gcloud config set' updates only the active one. Running 'gcloud config configurations list' reveals which is active. There is no 24-hour caching behaviour or character-length restriction in gcloud.
Q5. Which statement correctly describes a Google Cloud project ID?
  • A.  It can be changed at any time via the Cloud Console without affecting existing resources
  • B.  It is globally unique across all of Google Cloud and, once set, cannot be changed
  • C.  It is automatically identical to the project name
  • D.  It only needs to be unique within the owning organization
Show answer & explanation
✓ Answer: B. It is globally unique across all of Google Cloud and, once set, cannot be changed
A project ID is a permanent, globally unique identifier chosen at creation time; it cannot be reused by anyone else even after the project is deleted. The project name, by contrast, is mutable and does not need to be unique.
Test yourself
See the Google Associate Cloud Engineer page

More Google Associate Cloud Engineer topics