Skip to main content

Google Cloud credentials authentication

Google Cloud credentials authentication uses Google Cloud service account credentials to authenticate the target Google Cloud service account.

To prepare to use Google Cloud credentials authentication, see Set up and use Google Cloud credentials authentication.

To configure Google Cloud credentials authentication with Databricks, you must set the following associated environment variables, .databrickscfg fields, Terraform fields, or Config fields:

  • The Databricks host.
    • For account operations, specify https://accounts.gcp.databricks.com.
    • For workspace operations, specify the workspace URL, for example https://1234567890123456.7.gcp.databricks.com.
  • For account operations, the Databricks account ID.
  • The Google Cloud credentials, specified as the local path to the private key portion of the Google-managed key pair for the Google Cloud service account, or the contents of this private key portion in JSON format.

To perform Google Cloud credentials authentication with Databricks, integrate the following within your code, based on the participating tool or SDK:

To use environment variables for a specific Databricks authentication type with a tool or SDK, see Authorizing access to Databricks resources or the tool’s or SDK’s documentation. See also Environment variables and fields for client unified authentication and the Default methods for client unified authentication.

For account-level operations, set the following environment variables:

  • DATABRICKS_HOST, set to the value of your Databricks account console URL, https://accounts.gcp.databricks.com.
  • DATABRICKS_ACCOUNT_ID
  • GOOGLE_CREDENTIALS

For workspace-level operations, set the following environment variables:

  • DATABRICKS_HOST, set to the value of your Databricks workspace URL, for example https://1234567890123456.7.gcp.databricks.com.
  • GOOGLE_CREDENTIALS