Add a Spot connector
Connect Harness to your Spot account for Elastigroup deployments.
Use a Harness Spot connector to connect Harness to your Spot account. Use the Spot connector to provision and deploy to Spot Elastigroup resources from Harness pipelines.
What you will learn from this topic
How to create a Spot connector using the Harness Manager.
How to define a Spot connector using a YAML example.
How to create a Spot connector using the Harness Terraform Provider.
Before you begin
Spot account ID and API token: Harness authenticates to your Spot account using a permanent token. Go to Get your account ID and Create an API token to generate a Spot account ID and API token.
Harness Delegate: A running Harness Delegate that can reach your Spot account. Go to Delegate installation overview to install one. Connect through a Harness Delegate rather than the Harness Platform, because you need a delegate later when you deploy to your Spot cloud.
Create a Spot connector
Perform the following steps to create the Spot connector using the Harness Manager.
Open a Harness project, and select Connectors under Project Setup. You can also create connectors at the account or organization levels.
Select New Connector, and then select Spot under Cloud Providers.
Overview
Enter a Name for the connector. Description and Tags are optional. Harness automatically creates an Id (entity identifier) for the connector based on the Name. Select Continue to proceed to Credentials.

Credentials
Under Authentication, select one of the following options for the Spot Account Id field, and then select Continue:
Plaintext: Enter the Spot Account Id directly, and select Create or Select a Secret to add the API Token.
Encrypted: Create or select a secret for both the Spot account ID and the API token.

Select Connectivity Mode
Under Connect to the provider, select how you want Harness to connect to Spot, and then select Save and Continue:
Connect through Harness Platform: Harness communicates with Spot securely through the Harness Platform. Credentials are encrypted and stored in the Secret Manager configured in Harness.
Connect through a Harness Delegate: Harness communicates with Spot through a Harness Delegate installed in your environment. Select this option if Spot is behind a corporate firewall.

Delegates Setup
This step appears only if you selected Connect through a Harness Delegate. Select one of the following options, and then select Save and Continue:
Use any available Delegate.
Only use Delegates with all of the following tags: Enter the tag of the delegate you installed.

Connection Test
Harness validates the Spot connector authentication and permissions. Once verification succeeds, select Finish.

The connector now appears in the Connectors list.
Create a Spot connector using the API
Create the Spot connector using the Create a Connector API. The request sends the connector definition as JSON in the request body.
The request uses the following query parameter, headers, and body fields.
accountIdentifier(query parameter, required): The identifier of the Harness account where the connector is created. Replace<YOUR_ACCOUNT_ID>with your account identifier.Content-Type(header, required): Set toapplication/jsonbecause the request body is JSON.x-api-key(header, required): A Harness API key with permission to create connectors in the target scope. Replace<YOUR_API_KEY>with your API key. For details on creating one, go to Add and manage API keys.connector.name: The connector display name shown in the Harness UI.connector.identifier: A unique identifier for the connector. You cannot change the identifier after creation. For the identifier format, go to the Entity Identifier reference.connector.description: An optional description for the connector.connector.orgIdentifier: The identifier of the organization that owns the connector. Omit this field to create the connector at the account scope.connector.projectIdentifier: The identifier of the project that owns the connector. Omit this field to create the connector at the account or organization scope. A project-scoped connector requiresorgIdentifieras well.connector.type: The connector type. UseSpotfor a Spot connector.connector.spec.credential.type: The authentication method. UsePermanentTokenConfigto authenticate with a Spot account ID and API token.connector.spec.credential.spec.spotAccountId: Your Spot account ID. Replace<YOUR_SPOT_ACCOUNT_ID>with your account ID, or usespotAccountIdRefinstead to reference the value from a secret.connector.spec.credential.spec.apiTokenRef: A reference to the Harness secret that stores your Spot API token. Replace<YOUR_API_TOKEN_SECRET_REF>with your secret reference.connector.spec.executeOnDelegate: Set totrueto connect through a Harness Delegate, orfalseto connect through the Harness Platform.
YAML example
The following YAML defines a Spot connector that authenticates using a permanent token.
Terraform Provider examples
You can also create a Spot connector using the Harness Terraform Provider.
Next steps
Delegate installation overview: Install and configure a Harness Delegate for your Spot connector.
Harness Terraform Provider connector resources: Manage the Spot connector using Terraform.
Last updated
Was this helpful?