Use this file to discover all available pages before exploring further.
Before Porter can create a cluster, you need to grant it access to your cloud account. Porter uses secure credential methods that don’t require storing static API keys.
AWS
GCP
Azure
Porter uses AWS IAM role assumption via the AssumeRoleoperation to access your account. You create a role in your AWS account and declare that you trust Porter to assume it. This eliminates static credentials and makes access easy to revoke.
After selecting AWS as your cloud provider, log into your AWS Console and find your 12-digit Account ID in the top-right corner.Enter this ID in Porter and click Grant Permissions.
2
Create the CloudFormation stack
Porter opens the AWS CloudFormation console in a new tab to create a stack that provisions the porter-manager IAM role.
If the popup is blocked, check your browser settings and allow popups from Porter.
Scroll to the bottom of the CloudFormation page, check the I acknowledge that AWS CloudFormation might create IAM resources box, and click Create Stack.Wait for the stack creation to complete (this takes a few minutes).
The IAM role must remain in your AWS account for Porter to manage your infrastructure. Deleting it will prevent Porter from making changes.
First, delete any clusters through the Porter dashboard
Navigate to CloudFormation Stacks in your AWS console
Select the stack named PorterRole and click Delete
This removes the IAM role and prevents Porter from accessing your account.
Porter supports two methods for connecting your GCP project:
Workload Identity Federation (recommended) — keyless, short-lived credentials issued via federation from Porter’s AWS account to your GCP project. No JSON key file to store, rotate, or leak.
Service account JSON key — long-lived JSON key uploaded directly to Porter. Use this if your organization restricts Workload Identity Federation or you need a fully manual setup.
Before connecting your GCP project to Porter, ensure that a billing account is attached to the project. Porter cannot provision infrastructure in a project without an active billing account.
Porter runs a guided Cloud Shell flow that provisions a Workload Identity Pool, Provider, and service account in your GCP project using Terraform, then calls back to Porter to finalize the integration. Porter impersonates the service account using short-lived federated credentials — no JSON key is ever created or transmitted.
1
Enter your GCP project ID
After selecting GCP as your cloud provider and choosing Workload Identity Federation, enter your GCP project ID (for example, my-prod-project — not the numeric project number).Click Continue. Porter returns a Cloud Shell deeplink and a one-line setup command.
2
Open Cloud Shell
Click Open Cloud Shell. Google Cloud Shell launches in a new tab with the public porter-dev/gcp-onboarding repo cloned into the session.
The setup command is single-use and embeds a verification token tied to your Porter project. The token expires after a short window — if it expires before you finish, return to Porter and restart the flow to issue a new one.
3
Run the bootstrap script
Copy the setup command from Porter and paste it into the Cloud Shell terminal. The command looks like:
Create a Workload Identity Pool and AWS-backed Provider scoped to Porter’s AWS account
Create a porter-manager service account with the Project IAM Admin role
Configure the Provider’s attribute condition so only Porter’s tenant-scoped sessions can impersonate the service account
When Terraform finishes, the script calls Porter back with the project number, service account email, and provider resource name. Porter verifies it can federate into the project and marks the integration as connected.
4
Confirm in Porter
Return to the Porter tab. The cloud account status updates to Connected once the callback completes. You can now provision clusters in the project.
Porter’s Cluster Control Plane runs in an AWS account. The Terraform module configures your Workload Identity Provider to trust assumed-role sessions originating from that account, with an attribute condition pinned to your tenant’s external ID. When Porter needs to act on your GCP project, it:
Self-assumes its IAM role with a session name containing your tenant external ID.
Exchanges the resulting AWS STS token at Google’s STS endpoint via the Workload Identity Provider.
Impersonates the porter-manager service account using the federated token.
The federated credentials are short-lived and scoped to a single tenant. No static keys exist on either side.
If the Cloud Shell session times out or Terraform fails partway through, return to Porter and start the flow again for the same project. Porter rotates the verification token but keeps the tenant external ID stable, so the Terraform state path is unchanged and terraform apply resumes cleanly.
First, delete any clusters through the Porter dashboard.
In the GCP Console, go to IAM & Admin → Workload Identity Federation and delete the porter-pool-* pool.
Delete the porter-manager service account from IAM & Admin → Service Accounts.
Alternatively, run terraform destroy against the module from the same Cloud Shell session.
Option 2: Service account JSON key (automated script)
If you have the gcloud CLI installed and authenticated (gcloud auth login), run our setup script:
# Download the setup scriptcurl -O https://raw.githubusercontent.com/porter-dev/docs/main/scripts/setup-gcp-porter.sh# Make it executablechmod +x setup-gcp-porter.sh# Run the script (optionally provide your GCP project ID)./setup-gcp-porter.sh [your-gcp-project-id]
The script:
Enables the Cloud Resource Manager API and Service Usage API
Creates a porter-manager service account
Grants the Project IAM Admin role
Downloads a JSON key file
After running the script, upload the generated key file to Porter.
Before creating the service account, enable the following APIs in your GCP Console:
Navigate to APIs & Services
Click Enable APIs and Services
Search for and enable each of these APIs:
Cloud Resource Manager API — required for Porter to manage IAM bindings
Service Usage API — required for Porter to enable all other APIs automatically
Each API may take a few minutes to enable.
The Service Usage API cannot be enabled programmatically if it is not already active — it must be enabled manually through the console or gcloud CLI before Porter can manage other APIs.
In the GCP Console, go to IAM & Admin → Service Accounts.
2
Create the account
Click Create Service Account and enter a name (e.g., porter-manager).
3
Grant permissions
Grant the service account the following role:
Resource Manager > Project IAM Admin
This is the only role you need to grant manually. Porter uses this role to automatically provision all other required IAM bindings (Storage Admin, Compute Admin, Kubernetes Engine Admin, etc.).Click Done to create the account.
4
Create a key
Find your new service account in the list
Under Actions, select Manage keys
Click Add Key → Create new key
Select JSON as the key type
The JSON key file downloads automatically — keep it safe
In Porter, click Drop a GCP Service Account JSON here, or click to browse and upload the JSON key file.Porter verifies the credentials and automatically provisions all required permissions and APIs. This takes about a minute.
You can create the service principal using our automated script (recommended) or manually.
Option 1: Automated setup (recommended)
If you have the Azure CLI installed and authenticated (az login), run our setup script:
# Download the setup scriptcurl -O https://raw.githubusercontent.com/porter-dev/docs/main/scripts/setup-azure-porter.sh# Make it executablechmod +x setup-azure-porter.sh# Run the script (optionally provide subscription ID)./setup-azure-porter.sh [your-subscription-id]
The script:
Enables all required Azure resource providers
Creates the custom porter-aks-restricted role
Creates the service principal with proper permissions
Adds Microsoft Graph API permissions
Grants admin consent (if you have permissions)
Displays the credentials needed for Porter
If the script fails to grant admin consent automatically, grant it manually in the Azure Portal: App registrations > azure-porter-restricted-sp > API permissions > Grant admin consent for Default Directory.
az ad sp create-for-rbac \ --name="azure-porter-restricted-sp" \ --role="porter-aks-restricted" \ --scopes="/subscriptions/${PORTER_AZURE_SUBSCRIPTION_ID}"
Azure requires client secrets to expire every 365 days. When a secret expires, Porter can’t manage infrastructure or deploy updates (existing workloads continue running).To refresh your client secret: