Repository navigation
feat: grant builder-user IAM roles via Terraform - #58
Merged
Merged
Conversation
Team members hit a 403 (`compute.instances.start` denied) when running `absconda ... --remote-builder`, because the Terraform module only granted IAM to the builder VM's own service account — never to the humans driving the build. Absconda shells out to `gcloud` under the invoking user's identity to start/stop the VM and tunnel over IAP, so each user needs their own roles. Add a `builder_users` variable (default: the ctp-archive team group) and grant each member: - roles/compute.instanceAdmin.v1 (start/stop/describe the VM) - roles/iap.tunnelResourceAccessor (SSH/SCP through the IAP tunnel) - roles/compute.osAdminLogin (OS Login with sudo; build uses sudo docker) - roles/iam.serviceAccountUser (actAs the builder SA when starting the VM) Document the explicit role list in team-setup.md and the Terraform README so other teams can provision their own builder users. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
g_cancer_tumour_progress_group does not exist in Google Workspace; the correct principal is g_cancer_tumour_progression_group@garvan.org.au. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A team member hit a 403 running
absconda ... --remote-builder/absconda publish:The account was authenticated — it was not authorized. Absconda shells out to the
gcloudCLI under the invoking user's identity to start/stop the VM and tunnel over IAP for the build (seesrc/absconda/remote.py). But the Terraform module only ever granted IAM to the builder VM's own service account — never to the humans driving the build.team-setup.mdjust said "check you have the necessary IAM roles" without listing or provisioning them, so anyone who wasn't already a project owner/editor hit this wall.Change
Add a
builder_usersTerraform variable (default:group:g_cancer_tumour_progress_group@garvan.org.au) and grant each member the roles actually needed to drive the builder:roles/compute.instanceAdmin.v1compute.instances.start)roles/iap.tunnelResourceAccessorroles/compute.osAdminLoginsudo docker buildroles/iam.serviceAccountUseriam.serviceAccounts.actAsCodifying this in Terraform (rather than one-off
gcloudcommands) keeps access reproducible. The variable is parameterized so other teams can grant their own group/users.Also documents the explicit role list in
docs/team-setup.md(new Required IAM Roles section) andterraform/gcp/README.md.To apply
Once applied, members of
g_cancer_tumour_progress_group@garvan.org.aucan runabsconda publishwith no per-user IAM changes.Notes / caveats
terraformwas not available in the dev environment, so the HCL was reviewed by hand but not run throughterraform validate. Please runterraform planbefore applying.🤖 Generated with Claude Code