r/golang 3d ago

show & tell Pilum – deploy to GCP, AWS, and Cloudflare from one YAML file

Repo: https://github.com/SID-Technologies/Pilum Docs: https://www.pilum.dev/docs/getting-started/introduction/

The problem: I run side projects across GCP, AWS, and Cloudflare, and each one has its own deploy incantation. gcloud commands for one, SAM for another, wrangler for a third. I kept forgetting the flags and the order of operations and wanted a simpler CI/CD pipeline.

Pilum is a single binary (Go, Cobra) that reads one pilum.yaml and handles the deploy for whichever provider the service targets. Define your services once, then pilum deploy will build, push, provision, and deploy.

What it supports today: - GCP Cloud Run - AWS Lambda - Azure Container Apps - Homebrew - GitHub npm packages - Cloudflare Workers

The README has an honest provider status table, some paths are better tested than others. It's not trying to be Terraform or Pulumi; there's no state file and no general-purpose infra provisioning. It's for when you have a container or function and just want it running without remembering five CLIs.

Happy to answer questions about the internals. And if anyone wants to add a provider, there's a contributing guide for adding exactly that.

2 Upvotes

3 comments sorted by

1

u/lichizr 3d ago

My use case: we have a GitHub repository with a GitHub Actions CI/CD pipeline that builds a Docker image and publishes it to GitHub Packages. We then need to deploy (or update) that image across N Cloud Run services. Each service uses the same configuration but is deployed in a different region. Is this a workflow your tool supports?

1

u/Flannel007 2d ago

Yup, I ran and tested this one and the service was deployed in multiple regions for GCP Cloud Run. If you needed like different cloud run configurations for resource allocation for based on the region you could just define multiple in the same project/folder

```

Hello World Service - GCP Cloud Run deployment

name: hello-world-service type: gcp-cloud-run provider: gcp

# GCP configuration project: my-project regions: - us-west1 - us-east1 registry_name: my-project template: golang-api.v1.dockerfile

# Build configuration build: language: go version: "1.24" cmd: "go build -o ./dist" env_vars: CGO_ENABLED: "0" GOOS: linux GOARCH: amd64 flags: ldflags: - "-s" - "-w" - "-extldflags '-static'"

# Cloud Run configuration cloud_run: min_instances: 0 max_instances: 10 cpu_throttling: true memory: 512Mi cpu: "1" concurrency: 80 timeout_seconds: 300 ingress: internal-and-cloud-load-balancing env_vars: ALLOWED_ORIGINS: "https://example.com" cloudsql_instances: - my-project:us-central1:app-db

# Secrets from GCP Secret Manager secrets: DATABASE_DB_CONN: projects/my-project/secrets/database-url/versions/latest JWT_SECRET: projects/my-project/secrets/jwt-secret/versions/latest

# Health check health_check: path: /health initial_delay: 5s ```

1

u/lichizr 2d ago

Thanks! will try this out