Data residency¶
Where each store that holds data lives, and whether its location is a data-protection concern. The rule that matters: user personal data is subject to residency and cross-border-transfer law (PIPEDA, Quebec Law 25, GDPR); infrastructure-support stores (Terraform state, code-signing certs, secret values, platform logs) are not personal data, so their region is an operational choice, not a legal obligation.
Where data lives¶
| Store | Holds | Personal data? | Location | Defined in |
|---|---|---|---|---|
| OVH server | Postgres (CNPG), Redis, NATS, every workload | Yes | Beauharnois, Quebec | OVH |
| R2 buckets | Media, Postgres backups, logs and traces, OTA, Photon index, seed sets | Yes (media, backups) | Location hint enam (eastern North America) |
infrastructure/cloudflare/r2.tf |
gs://tomoda-tfstate |
Terraform state for every stack | No (infra state) | northamerica-northeast1 (Montreal) |
infrastructure/*/backend.tf (bootstrap bucket, not Terraform-managed) |
gs://tomoda-ios-certs |
fastlane match store (encrypted iOS certs and profiles) | No (signing material) | us-central1 |
infrastructure/gcp/storage.tf |
| Secret Manager | Every secret value | No (credentials) | Automatic replication (Google picks the regions) | infrastructure/gcp/secrets.tf |
Cloud Logging _Default, _Required |
GCP audit and platform logs for the project | No (platform metadata) | global |
Google defaults, not Terraform |
The project has no Compute disks, GKE clusters, Cloud SQL, Firestore, BigQuery datasets or Artifact Registry repositories.
Assessment¶
User personal data is in Canada. Postgres (the primary datastore) runs on the OVH server in Beauharnois, Quebec. Media and database backups live in Cloudflare R2.
The one residency item to decide is R2's region: the buckets use the location hint enam (eastern North America), which spans the US and Canada and is not Canada-pinned, so objects may physically sit in the US. Cloudflare offers an EU jurisdiction but no Canada-only one. Options: accept and disclose it (the user-facing Privacy Policy already states data may be processed outside the user's country under Standard Contractual Clauses), or move media/backups to a provider that guarantees Canadian residency. Tracked as D1 in the operations compliance audit.
Infra-support stores are not personal data, so their location is not a residency obligation. Terraform state (Montreal), the fastlane signing store (us-central1), Secret Manager (automatic replication), and Cloud Logging (global) hold infra metadata, code-signing certs, secret values and platform logs, none of which is a user's personal data. Co-locating them nearer the rest of the stack is an operational choice, not a compliance requirement.
Secret Manager uses automatic replication, which lets Google store payloads in regions of its choice. Because secrets are credentials rather than personal data, this is acceptable; if a specific residency is ever required for a key, that secret can be recreated with user-managed replication to a chosen region.
State bucket (bootstrap)¶
gs://tomoda-tfstate holds the Terraform state for every stack (one <stack>/state/default.tfstate prefix each; all stacks use the default workspace). It is a bootstrap resource created and granted by hand, not managed by Terraform, so no stack manages its own backend. Create it (project owner) with:
gcloud storage buckets create gs://tomoda-tfstate \
--location=northamerica-northeast1 --uniform-bucket-level-access --pap
gcloud storage buckets update gs://tomoda-tfstate --versioning
gcloud storage buckets add-iam-policy-binding gs://tomoda-tfstate \
--member="serviceAccount:terraform-apply@development-485000.iam.gserviceaccount.com" \
--role=roles/storage.admin
terraform-ci reads state through its project-level roles/viewer; terraform-apply needs the explicit storage.admin grant above to write and lock. Every backend.tf points at this bucket.