Skip to main content

Google Cloud IAM roles

Seqera accesses your Google Cloud project through the IAM roles granted to the service account in your Google credentials. Grant the roles first, then create the credentials that use the service account.

To create and launch pipelines or Studio sessions with this compute environment type, attach Seqera credentials for the cloud provider. Some permissions are mandatory to create the compute environment and for it to function correctly. Seqera Platform uses the others to pre-fill options, which are optional.

Service account permissions​

Create a custom service account with at least the following permissions:

  • Compute Instance Admin (v1) (roles/compute.instanceAdmin.v1)
  • Project IAM admin (roles/resourcemanager.projectIamAdmin)
  • Service Account Admin (roles/iam.serviceAccountAdmin)
  • Service Account User (roles/iam.serviceAccountUser)
  • Service Usage Consumer (roles/serviceusage.serviceUsageConsumer)

Storage permissions​

If no Cloud Storage bucket in your Google Cloud project requires access restrictions, you can grant project Storage Admin (roles/storage.admin) permissions to your service account to simplify setup. To grant access only to specific buckets, add the service account as a principal on each bucket individually with the following roles:

  • Storage Admin (roles/storage.admin) on the work directory bucket. Seqera uses it to grant the compute environment's service account access to the bucket, and to display logs and reports.
  • Storage Object Viewer (roles/storage.objectViewer) on any other bucket your pipeline publishes reports to.
  • Storage Bucket Viewer (roles/storage.bucketViewer) on the project. Seqera needs the storage.buckets.list permission at the project level to list buckets and to validate the credential. Bucket-level grants cannot confer this permission.

For each Google Cloud compute environment, Seqera creates a separate service account with the permissions needed to launch pipelines and Studios. Seqera grants it:

  • Storage Object Admin (roles/storage.objectAdmin) on the work directory bucket
  • Storage Object Viewer (roles/storage.objectViewer) and Storage Bucket Viewer (roles/storage.bucketViewer) on the project
  • Logs Writer (roles/logging.logWriter) and Monitoring Metric Writer (roles/monitoring.metricWriter) on the project

The compute environment can read any bucket in the project, but write only to the work directory bucket. If your pipeline publishes results to a different bucket, grant the compute environment's service account Storage Object User (roles/storage.objectUser) on that bucket.

caution

On shared Google Cloud projects, roles/resourcemanager.projectIamAdmin lets the service account grant any role to any principal on the project. A compromised credential can then escalate to any project-level role. roles/iam.serviceAccountAdmin grants create and delete access to any service account in the project.

To harden this, add an IAM condition to the roles/iam.serviceAccountAdmin binding that restricts it to service accounts whose names start with towerforge-.

Userdata script error detection (optional)​

Seqera Platform can retrieve the serial port output of the Compute Engine instance to detect errors in the userdata script that bootstraps the VM during instance startup. The roles/compute.instanceAdmin.v1 role listed under Service account permissions includes this capability. If you use a custom role instead, include the compute.instances.getSerialPortOutput permission. Without this permission, Seqera Platform does not detect userdata script failures and shows no warning.

Intelligent Compute​

Intelligent Compute needs additional roles on this service account. The worker VM service account may also need roles. See Intelligent Compute required permissions.

Next step​

Create Google Cloud credentials for the service account.