Connect GCP Project to Spot
To allow Spot to manage GCP resources, it is necessary to authenticate Spot with a relevant GCP Project:
-
Log in to Spot Console.
-
In the Welcome page, click Google Cloud Platform.
-
Choose one of the methods to connect your account, manual or automatic (via gcloud).
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:
On GCP console:

Step 4
-
Grant your service account Editor permissions.
-
Create a JSON key.
-
Save the JSON file.
Step 5
Upload a Service Account Key. Browse the JSON file previously created.
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.
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.
Step 3
The script will output a spotinst_key.json
file. Select it using the Browse button.
Click on Connect to finish the process.