EYOX · Platform · Terraform groundwork
Terraform for the Eyox Google Cloud setup
One place to see and change the whole Google Cloud setup. First every project is copied into code as it is, with imports only and zero changes; after that, every change is a pull request and nobody changes the cloud by hand.
From pull request to Production
Scroll sideways to see every column.
On every push the plan covers each changed folder and, side by side, the Dev apply covers each changed Dev folder. Dev also goes back to main when such a pull request closes without merging, or when someone starts the Dev workflow by hand on main.
Every apply
What the guard lets through
| The plan wants to | While a folder is copied | Dev | Staging and Production |
|---|---|---|---|
| Import without changes | ✓ Yes | ✓ Yes | ✓ Yes |
| Create or change something | ✕ No | ✓ Yes | ✓ Yes |
| Delete or replace a database, bucket, disk, secret or machine | ✕ No | ✓ Yes | ⚠ Only if named |
| Weaken backups, versioning or deletion protection | ✕ No | ✓ Yes | ⚠ Only if named |
| Let an API switch off when it is removed from the code | ✕ No | ✕ No | ✕ No |
Scroll sideways to see every column.
"Named": the person starting the apply lists the exact resource. Dev may lose anything, so it can always go back to main.
Who reaches what
| Identity | Dev projects | Staging and Production projects | Organisation and billing | Dev state | Staging state | Prod state |
|---|---|---|---|---|---|---|
| terraform-planplan and drift check | Read | Read | Read | Read | Read | Read |
| terraform-apply-devDev workflow | Readwrite after the copy | None | None | Write | None | None |
| terraform-applyapply by hand | Read | Readwrite after the copy | Read | None | Write | Write |
| Ruben and Ikebootstrap, restores, locks | as today | Admin | Admin | Admin | ||
Scroll sideways to see every column.
Read means settings and access lists only, never images or secret values. Owner does not reach files in a bucket, so Ruben and Ike are named on each state bucket. An organisation owner applies the bootstrap and organisation folders by hand.
Folders, state and copy order
- 1eyox-scan-dev
- 5eyox-development
- 2eyox-scan-staging
- 6eyox-staging
- 3eyox-scan-production
- 4Atlas access list
- 7eyox-production
- bootstrapby hand
- organisationby hand
Copy first: one pull request per folder, imports only, zero changes, in this order. Then eyox-ml as the first new project.