Packages and modules in Go 1.27: go mod init and tidy, go.sum, exported names, internal/, versions and /v2 paths, replace for local work, go work workspaces and tool dependencies, all run for real with the output I got, plus an exercise.
Part 4 of the shorty series: hardening the Go container image. A static binary on distroless instead of scratch or alpine, a numeric non-root user, no shell, a read-only root filesystem, all capabilities dropped and the base image pinned by digest.
One VPC across two availability zones in Terraform, with public and private subnets, route tables, and three ways to get the private side online: a NAT gateway, a NAT instance or VPC endpoints, with Mumbai prices for each.
Run shorty's GitLab CI jobs on your own EC2 instance: create the runner in the UI, keep the glrt- token in SSM Parameter Store, install GitLab Runner 19.5 and Docker with Terraform user data, and read config.toml line by line.
CAP and PACELC make more sense once you watch a replica return stale data. I set up a Postgres 18 primary and replica, broke read-your-writes on purpose, fixed it with WAL positions in Go, and timed what eventually means in milliseconds.
Changing a busy Postgres table without stopping the app: the lock queue that turns a 1 ms ALTER into an outage, lock_timeout, fast defaults, NOT NULL as NOT VALID in Postgres 18, renaming a column with expand and contract, batched backfills and CREATE INDEX CONCURRENTLY.
Run shorty on a local kind cluster: a Deployment, a Service, a migration Job, port-forward, a rolling update and a rollback, explained for people who already know Docker.
Building a small VPC module in Terraform with inputs, validation and outputs, calling it from two root modules with different settings, and pinning it to a git tag so a change to the module can't surprise a project that didn't ask for it.
Errors as values in Go: wrapping with %w, errors.Is, errors.As and the new errors.AsType, sentinel vs typed errors, errors.Join, when a panic is fine, and a new Go 1.27 vet check for wrapped error pointers. Runnable examples and an exercise.
Part 3 of the shorty series: one compose.yaml for the Go API, Postgres 18 and Redis 8, with a one-shot migrate service, idempotent seed data, named volumes and healthchecks. Plus the Postgres 18 volume path change and a seed that failed on the first run.
The ECS mental model in one post: what a cluster, task definition, task and service really are, how a deploy rolls, the difference between the task role and the execution role, and what Fargate costs against EC2 in Mumbai.
A first .gitlab-ci.yml for shorty, the Go URL shortener: stages, jobs, workflow rules, a Postgres service, test reports and the difference between artifacts and caches. Checked locally with gitlab-ci-local and the real job commands.