Skip to content

Connect Google Cloud ​

Connect Google Cloud so an agent can use the gcloud CLI with credentials stored in Pulumi ESC. ESC supplies these credentials when the command runs.

Choose the service account ​

Use a service account with access to the projects and resources the agent needs. Grant only the actions required for its work. See Choose integration permissions to choose which permissions to grant.

Prepare an ESC environment ​

Use the Google Cloud login provider to get a temporary access token. Under environmentVariables, export its accessToken output as CLOUDSDK_AUTH_ACCESS_TOKEN. Set CLOUDSDK_CORE_PROJECT to the project ID the agent should use. The login provider's example shows the complete gcloud configuration.

Grant the agent's Pulumi Cloud role permission to open the environment, so ESC can supply the token to gcloud.

Connect the environment ​

With permission to manage organization integrations (org_integrations:update):

Give the connection a name that identifies its purpose, such as staging-google-cloud. Include the project ID and any region or zone restrictions in its notes.

Use the connection ​

Include the connection name, project ID, and target resources in the assignment.

Content from the official Pulumi documentation (github.com/pulumi/docs).