Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.maia.ai/llms.txt

Use this file to discover all available pages before exploring further.

This guide lists all GCP IAM roles and permissions required to deploy and run a on Google Kubernetes Engine (GKE). It covers two distinct principals: the Terraform deployer (the human or CI identity running terraform apply) and the runtime service accounts, which are automatically provisioned by Terraform. For the full deployment walkthrough, see the GKE deployment guide.

Required GCP APIs

Enable the following APIs in the target GCP project before running Terraform. Replace YOUR_PROJECT_ID with your actual GCP project ID.
gcloud services enable \
  container.googleapis.com \
  compute.googleapis.com \
  secretmanager.googleapis.com \
  storage.googleapis.com \
  iam.googleapis.com \
  cloudresourcemanager.googleapis.com \
  artifactregistry.googleapis.com \
  --project=YOUR_PROJECT_ID
APIPurpose
container.googleapis.comGKE cluster and node pool management.
compute.googleapis.comVPC network, subnets, Cloud NAT, and firewall rules.
secretmanager.googleapis.comSecret Manager secrets for credentials.
storage.googleapis.comGCS bucket for staging storage.
iam.googleapis.comService account creation and IAM binding (Workload Identity).
cloudresourcemanager.googleapis.comProject metadata read access—required by roles/browser for the GCP Project ID field in the UI.
artifactregistry.googleapis.comPull container images from GCP Artifact Registry.

Terraform deployer permissions

The identity running terraform apply must have the following IAM roles on the target GCP project. These can be granted to a user account, a service account used by CI/CD, or a group.
IAM rolePurposeScope
roles/container.adminCreate and manage GKE clusters and node pools.Project
roles/compute.networkAdminCreate VPC network, subnets, and Cloud NAT.Project
roles/iam.serviceAccountAdminCreate the GKE node service account and the Workload Identity service account.Project
roles/iam.serviceAccountUserAttach service accounts to GKE nodes.Project
roles/iam.securityAdminGrant IAM bindings to service accounts—covers both project-level (google_project_iam_member) and SA-level (Workload Identity binding) policies.Project
roles/storage.adminCreate the staging GCS bucket and set bucket-level IAM policies.Project
roles/secretmanager.adminCreate the Secret Manager secret and set secret-level IAM policies.Project
roles/artifactregistry.adminCreate and manage Artifact Registry repositories (required if creating the repository via Terraform).Project
roles/logging.adminCreate log buckets and sinks (required if managing Cloud Logging resources via Terraform).Project
roles/owner or roles/editor + roles/iam.securityAdmin will also satisfy all requirements. The granular roles above are recommended for production environments, following the principle of least privilege.

Maia runner runtime permissions

Terraform automatically creates and configures two service accounts. No manual IAM grants are required for these.

Maia runner Workload Identity service account

This service account is annotated onto the Kubernetes service account via Workload Identity, so pods authenticate to GCP APIs without any key files. The following roles are granted automatically by Terraform.
IAM roleScopeWhy it’s needed
roles/iam.workloadIdentityUserGCP service accountBinds the Kubernetes service account to this GCP service account via Workload Identity Federation—enables secretless pod authentication.
roles/storage.objectAdminStaging GCS bucketRead, write, and delete objects in the ‘s own staging bucket.
roles/secretmanager.secretAccessorProject-wideRead secret values from Secret Manager—required for the to retrieve credentials and for the Matillion UI to read secrets.
roles/secretmanager.viewerProject-wideList and get secret metadata—required for the Matillion UI list-secrets functionality.
roles/browserProject-wideRead GCP project metadata—required for the GCP Project ID field when adding secrets in the Matillion UI.
roles/secretmanager.secretVersionManager Secret Manager secretManage versions of the ‘s own Secret Manager secret.
roles/storage.legacyBucketReader + roles/storage.objectViewerEach additional GCS bucket (optional)Bucket metadata and object read access—required to download file contents from user-supplied buckets (custom CA certificates, Python extension libraries, external JDBC drivers).
roles/cloudkms.cryptoKeyDecrypter (optional)Cloud KMS key(s)Decrypt CMEK-encrypted secrets—only required if you use customer-managed encryption keys (CMEK) in Secret Manager.
The optional extra GCS bucket permissions (roles/storage.legacyBucketReader and roles/storage.objectViewer) are only granted when bucket names are supplied via the runner_gcs_buckets Terraform variable. Typical use cases include custom CA certificate bundles, Python extension libraries, and external JDBC drivers.

GKE node service account

A separate, least-privilege service account is attached to the GKE nodes for cluster operations. The following roles are granted automatically by Terraform.
IAM roleScopeWhy it’s needed
roles/logging.logWriterProjectWrite container and node logs to Cloud Logging.
roles/monitoring.metricWriterProjectWrite node and pod metrics to Cloud Monitoring.
roles/monitoring.viewerProjectRead monitoring data for node health checks and autoscaling decisions.

Pipeline-level permissions

The following permissions are required at pipeline execution time, depending on the data warehouse the connects to. These aren’t provisioned by the GKE deployment Terraform—they must be granted separately to the Workload Identity service account, or to a delegated service account.

BigQuery

IAM roleScopeWhy it’s needed
roles/bigquery.jobUserProject (required)Submit and run BigQuery jobs—must be project-level; can’t be scoped to a dataset.
roles/bigquery.dataViewerDataset or projectRead data from BigQuery datasets and tables.
roles/bigquery.dataEditorDataset or projectRead and write data—only required if the pipeline writes back to BigQuery.
roles/bigquery.readSessionUserProjectUse the BigQuery Storage Read API for efficient large reads—recommended for production workloads.
Dataset-level grants are preferred for roles/bigquery.dataViewer and roles/bigquery.dataEditor, to follow the principle of least privilege.

Snowflake via GCS staging

Snowflake access isn’t governed by GCP IAM—the authenticates to Snowflake using credentials stored in Secret Manager (key-pair, OAuth, or username/password). However, if Snowflake uses a GCS Storage Integration for staging, the following additional permission is needed on the Snowflake staging bucket:
IAM roleScopeWhy it’s needed
roles/storage.objectAdminSnowflake staging GCS bucketAllows the Snowflake GCS integration service account to read and write stage files.

Workload Identity binding

Workload Identity allows Kubernetes pods to impersonate a GCP service account without storing any key files in the cluster. Terraform configures this binding automatically. It takes the form:
serviceAccount:<PROJECT_ID>.svc.id.goog[<K8S_NAMESPACE>/<K8S_SERVICE_ACCOUNT_NAME>]
  → roles/iam.workloadIdentityUser on <RUNNER_GCP_SA>
  • K8S_NAMESPACE defaults to var.name. Override with the k8s_namespace Terraform variable if your Helm release is deployed into a different namespace.
  • K8S_SERVICE_ACCOUNT_NAME defaults to <name>-sa. Override with k8s_service_account_name if your Helm release name differs from var.name.
If the Kubernetes namespace or service account name doesn’t match the Workload Identity binding, pods will silently fail to authenticate to GCP APIs. Run terraform apply a second time if you see an identity pool race condition error after initial cluster creation.

Quick reference

The following table summarizes all permissions.
PrincipalIAM roleScopeProvisioned by
GKE node SAroles/logging.logWriterProjectTerraform
GKE node SAroles/monitoring.metricWriterProjectTerraform
GKE node SAroles/monitoring.viewerProjectTerraform
Workload Identity SAroles/bigquery.dataViewer / roles/bigquery.dataEditorDataset or projectManual (BigQuery pipelines)
Workload Identity SAroles/bigquery.jobUserProjectManual (BigQuery pipelines)
Workload Identity SAroles/browserProject-wideTerraform
Workload Identity SAroles/cloudkms.cryptoKeyDecrypterCloud KMS key(s)Manual (if CMEK used)
Workload Identity SAroles/iam.workloadIdentityUserGCP service accountTerraform
Workload Identity SAroles/secretmanager.secretAccessorProject-wideTerraform
Workload Identity SAroles/secretmanager.secretVersionManager secretTerraform
Workload Identity SAroles/secretmanager.viewerProject-wideTerraform
Workload Identity SAroles/storage.legacyBucketReader + roles/storage.objectViewerEach additional GCS bucketTerraform (optional)
Workload Identity SAroles/storage.objectAdminStaging GCS bucketTerraform
Terraform deployerroles/artifactregistry.adminProjectManual
Terraform deployerroles/compute.networkAdminProjectManual
Terraform deployerroles/container.adminProjectManual
Terraform deployerroles/iam.securityAdminProjectManual
Terraform deployerroles/iam.serviceAccountAdminProjectManual
Terraform deployerroles/iam.serviceAccountUserProjectManual
Terraform deployerroles/logging.adminProjectManual
Terraform deployerroles/secretmanager.adminProjectManual
Terraform deployerroles/storage.adminProjectManual