Skip to main content
TrueFoundry supports integrating with multiple GCP services like GCS, GKE, GCR, GSM, GCP Models etc. To integrate any of the above services, you simply need to add your GCP account as a provider account and add integrations for the same as shown below:
Share access with users, teams or everyone in your TrueFoundry account As shown in the previous slides, you can share access of each integration with users, teams or everyone in your TrueFoundry account. This would allow them to view and use the integration. Only tenant-admins can edit the integrations.

Create a custom serviceaccount

Step 1 — Create a GCP IAM Service AccountCreate an IAM service account (name can be anything but add a prefix tfy to differentiate it with others).
export GCP_PROJECT_ID=<GCP_PROJECT_ID>
export GSA_NAME=<GCP_SERVICE_ACCOUNT_NAME>

gcloud iam service-accounts create $GSA_NAME \
  --project="$GCP_PROJECT_ID" \
  --display-name="$GSA_NAME"
Step 2 — Create a JSON Key for the Service AccountGenerate a JSON key file for the service account. This key will be used to authenticate the service account in TrueFoundry.
export GSA_EMAIL=$GSA_NAME@$GCP_PROJECT_ID.iam.gserviceaccount.com

gcloud iam service-accounts keys create $GSA_NAME-key.json \
  --iam-account="$GSA_EMAIL" \
  --project="$GCP_PROJECT_ID"
The generated $GSA_NAME-key.json file is what you will provide in TrueFoundry when adding the GCP provider account.Step 3 — (Optional) Workflow Propeller BindingIf you are using the workflow propeller, add the following binding to the service account:
gcloud iam service-accounts add-iam-policy-binding $GSA_EMAIL \
    --role roles/iam.workloadIdentityUser \
    --member "serviceAccount:$GCP_PROJECT_ID.svc.id.goog[tfy-workflow-propeller/flytepropeller]" \
    --project $GCP_PROJECT_ID

Integrations

Follow the steps below to connect GCS storage to TrueFoundry:
  1. Create a GCP bucket.
    • Make sure to add the lifecycle configurations on the bucket to delete multipart upload after 7 days.
    • For this go to GCP bucket -> Lifecycle -> Add a rule
    • Select Delete multi-part upload for 7 days
  2. We also need to add the CORS policy to the GCP bucket. Right now adding the CORS policy to the GCP bucket is not possible through the console so for this, we will use gsutil
    1. Create a file called cors.json using the below command
    cat > cors.json <<EOF
    [
        {
          "origin": ["*"],
          "method": ["GET", "POST", "PUT"],
          "maxAgeSeconds": 3600
        }
    ]
    EOF
    
    1. Attach the above CORS policy to the service account by running the following command using gsutils
    gsutil cors set cors.json  gs://BUCKET_NAME
    
  3. Create a custom IAM role with the following permissions and add to the serviceaccount created above:
    [
      "storage.objects.create",
      "storage.objects.delete",
      "storage.objects.get",
      "storage.objects.list",
      "storage.objects.update",
      "storage.buckets.create",
      "storage.buckets.get",
      "storage.buckets.list",
      "storage.buckets.create",
      "storage.buckets.update",
      "storage.multipartUploads.create",
      "storage.multipartUploads.list",
      "storage.multipartUploads.listParts",
      "storage.multipartUploads.abort",
      "resourcemanager.projects.get",
    ];
    
  4. Add the following IAM condition - resource.name.startsWith('projects/\_/buckets/<bucket name>}')
  5. Navigate to Integrations tab and follow the steps shown the previous demo to integrate your storage.
  1. Create a custom IAM role with the following permissions and add to the serviceaccount created above:
    [
      "artifactregistry.dockerimages.get",
      "artifactregistry.dockerimages.list",
      "artifactregistry.locations.get",
      "artifactregistry.locations.list",
      "artifactregistry.repositories.get",
      "artifactregistry.repositories.list",
      "artifactregistry.repositories.create",
      "artifactregistry.repositories.createTagBinding",
      "artifactregistry.repositories.delete",
      "artifactregistry.repositories.deleteArtifacts",
      "artifactregistry.repositories.deleteTagBinding",
      "artifactregistry.repositories.downloadArtifacts",
      "artifactregistry.repositories.get",
      "artifactregistry.repositories.getIamPolicy",
      "artifactregistry.repositories.list",
      "artifactregistry.repositories.listEffectiveTags",
      "artifactregistry.repositories.listTagBindings",
      "artifactregistry.repositories.update",
      "artifactregistry.repositories.uploadArtifacts",
      "artifactregistry.tags.get",
      "artifactregistry.tags.list",
      "artifactregistry.tags.create",
      "artifactregistry.tags.update",
      "artifactregistry.versions.get",
      "artifactregistry.versions.list",
      "artifactregistry.versions.delete",
    ];
    
  2. Navigate to Integrations tab and follow the steps shown the previous demo to integrate your Artifact registry.
  1. Create a custom IAM role with the following permissions and add to the serviceaccount created above:
    [
      "secretmanager.secrets.get",
      "secretmanager.secrets.list",
      "secretmanager.secrets.create",
      "secretmanager.secrets.delete",
      "secretmanager.secrets.update",
      "secretmanager.versions.access",
      "secretmanager.versions.list",
      "secretmanager.versions.get",
      "secretmanager.versions.add",
      "secretmanager.versions.destroy",
      "resourcemanager.projects.get",
    ];
    
  2. Add the following IAM condition- resource.name.startsWith('projects/<GCP Project Number>/secrets/tfy')
  3. Navigate to Integrations tab and follow the steps shown the previous demo to integrate your secret manager.
  1. Create a custom IAM role with the following permissions and add to the serviceaccount created above:
    [
      "container.clusters.get",
      "container.clusters.list",
      "container.clusters.update",
      "container.nodes.delete",
      "container.nodes.list",
      "container.nodes.get",
      "container.nodes.getStatus",
      "container.nodes.list",
      "container.operations.get",
      "resourcemanager.projects.get",
    ];
    
  2. Navigate to Integrations tab and follow the steps shown the previous demo to integrate your GKE cluster.
  1. Create the GCP Provider Account as described in the demo at the top of this document.
  2. Create a custom IAM role with the following permission and add to the serviceaccount created above:
    ["aiplatform.endpoints.predict"];
    
  3. Navigate to Integrations tab and edit the GCP Provider Account previously created and add the required models using their model id and they should start showing up in the AI Gateway. Here’s an example of adding gemini-1.5-flash-001.