Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

Google Cloud Platform (GCP) Setup

The Pulumi Google Cloud Platform Provider needs to be configured with Google credentials before it can be used to create resources.

When developing locally, we recommend that you install the Google Cloud SDK and then authorize access access with a user account.

If gcloud is not configured to interact with your Google Cloud project, set it through the config command.

gcloud config set project <YOUR_GCP_PROJECT_HERE>

Next, Pulumi requires default application credentials to interact with your Google Cloud resources, so run auth application-default login command to obtain those credentials.

gcloud auth application-default login

Optional Settings

The Pulumi Google Cloud Platform Provider accepts these environment variables to further configure the provider:

  • GOOGLE_PROJECT - The default project for new resources, if one is not specified when creating a resource
  • GOOGLE_REGION - The default region for new resources, if one is not specified when creating a resource
  • GOOGLE_ZONE - The default zone for new resources, if one is not specified when creating a resource.

If these values are not provided, some resources may require you to provide these values as project, region, or zone properties. You may also set these values per project using pulumi config:

$ pulumi config set gcp:project <your-project-here>
$ pulumi config set gcp:region <your-region-here>
$ pulumi config set gcp:zone <your-zone-here>