← All insightsAutomation

Automating Google Cloud from scratch

CodeWizard Academy · 31 December 2025 · 3 min read · Intermediate

Anything you do to Google Cloud twice should be automated. This walks the path from a manual install to a repeatable, pipeline-driven setup.

1. Install it reproducibly

bash
curl https://sdk.cloud.google.com | bash
gcloud init
gcloud auth application-default login

2. Describe the desired state

A GCS bucket with uniform access via Terraform.

hcl
resource "google_storage_bucket" "assets" {
  name                        = "acme-assets"
  location                    = "EU"
  uniform_bucket_level_access = true
  versioning { enabled = true }
}

3. Run it from CI

Auth from GitHub Actions via Workload Identity Federation.

yaml
- uses: google-github-actions/auth@v2
  with:
    workload_identity_provider: projects/123/locations/global/workloadIdentityPools/gh/providers/gh
    service_account: ci@acme.iam.gserviceaccount.com

Want senior help putting Google Cloud to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult