Skip to main content

Connect GCP Project to Spot

To allow Spot to manage GCP resources, it is necessary to authenticate Spot with a relevant GCP Project:

  1. Log in to Spot Console.

  2. In the Welcome page, click Google Cloud Platform.

  3. Choose one of the methods to connect your account, manual or automatic (via gcloud).

tip

For the connection with your GCP project to work, the Identity and Access Management (IAM) API should be enabled for the project. You may refer to Enabling and Disabling Services by Google Cloud to enable the IAM API for your project.

Manual Method

Step 1

Log in to the Google Cloud project you would like Spot to connect to. Use the button for quick navigation.

Step 2

Navigate to Service Account and select your project.

Step 3

Create a service account for Spot actions. Name it as described in the wizard:

On Spot Console:

Service account on Spot Console

On GCP console:

Step 4

  1. Grant your service account Editor permissions.

  2. Create a JSON key.

  3. Save the JSON file.

Step 5

Upload a Service Account Key. Browse the JSON file previously created.

Upload a Service Account Key

Click Connect to finish the process.

Automatic Method

Prerequisites

  • Have gcloud installed.
  • Have permissions to create a service account.

Step 1

Enter the GCP project ID you would like to connect.

Enter GCP project ID

Step 2

Copy the provided script and run it on a local terminal with gcloud available. The GCP_Project_ID parameter is replaced dynamically with the value provided in step 1.

Copy and run script

Step 3

The script will output a spotinst_key.json file. Select it using the Browse button.

Select JSON file

Click on Connect to finish the process.