Skip to main content
porter cloud-accounts contains commands for connecting your AWS, GCP, and Azure cloud accounts to Porter and managing them from the CLI. Connecting a cloud account grants Porter scoped access to your cloud provider so it can provision clusters and deploy applications into your own infrastructure. For the dashboard-based workflow and provider setup details, see Connecting a Cloud Account.

Prerequisites

  • You’ve logged in to the Porter CLI after running porter auth login
  • You’re connected to the correct project by running porter config set-project
  • You have permission to create the required IAM role, service account, or app registration in the cloud account you want to connect

porter cloud-accounts list

List the cloud accounts connected to the current project. Usage:
Options: The default output is a table with the account’s Name, Provider, Provider ID (AWS account ID, GCP project ID, or Azure subscription ID), Status, and Created At. When the output is piped to another command, it is printed as tab-separated values so it stays friendly to tools like grep, cut, and awk.

porter cloud-accounts connect

Connect a new cloud account to your Porter project. This is a parent command; run one of the provider-specific subcommands below.
Each subcommand runs interactively by default, prompting for the identifiers it needs. Pass the corresponding flags to skip the prompts for use in scripts and CI.

porter cloud-accounts connect aws

Connect a new AWS cloud account by creating a CloudFormation stack that grants Porter a scoped IAM role. Usage:
Options: When you run the command, Porter generates a CloudFormation stack and prompts you to open the AWS console (or copy the URL) to deploy it. The CLI then waits for the connection to complete, polling for up to 10 minutes.

porter cloud-accounts connect gcp

Connect a new GCP cloud account by running a setup command in Google Cloud Shell that grants Porter access via Workload Identity Federation. Usage:
Options: Porter prompts you to open Google Cloud Shell (or copy the URL) and displays a setup command to run there. The CLI waits for the connection to complete. The setup command expires after a period of time; if it does, re-run the command to generate a fresh one.

porter cloud-accounts connect azure

Connect a new Azure cloud account by granting Porter access to your subscription via Workload Identity Federation. Usage:
Options:
The connect subcommands are idempotent: if the account you specify is already connected to the project, Porter detects it and won’t create a duplicate connection.

porter cloud-accounts disconnect

Disconnect a cloud account from the current project. Porter tears down the resources it provisioned and revokes its stored credentials. Usage:
The <account> argument identifies the account by its ID, name, or provider ID (AWS account ID, GCP project ID, or Azure subscription ID). Use porter cloud-accounts list to find these values. Options:
All resources must be deleted from a cloud account before it can be disconnected.
After disconnecting, Porter prints provider-specific instructions for the manual cleanup you may want to perform in your own cloud account:
  • AWS — Delete the CloudFormation stack (PorterRole in us-east-2)
  • GCP — Delete the Workload Identity pool and service account
  • Azure — Delete the app registration
On an interactive terminal, the CLI also offers to open the relevant provider console for you.