For the complete documentation index, see llms.txt. This page is also available as Markdown.

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


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.

  1. Open a Harness project, and select Connectors under Project Setup. You can also create connectors at the account or organization levels.

  2. 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.

Spot connector overview step

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.

Spot connector credentials step

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.

A Harness Delegate is used for deployment operations even if you select Connect through Harness Platform.

Spot connector connectivity mode step

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.

Spot connector delegates setup step

Connection Test

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

Spot connector connection test step

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.

Create Connector API request

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 to application/json because 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 requires orgIdentifier as well.

  • connector.type: The connector type. Use Spot for a Spot connector.

  • connector.spec.credential.type: The authentication method. Use PermanentTokenConfig to 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 use spotAccountIdRef instead 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 to true to connect through a Harness Delegate, or false to connect through the Harness Platform.


YAML example

The following YAML defines a Spot connector that authenticates using a permanent token.

Spot connector YAML

Terraform Provider examples

You can also create a Spot connector using the Harness Terraform Provider.

Create a Spot connector using a permanent token and a plaintext Spot account ID
Create a Spot connector using a permanent token and a secret-referenced Spot account ID
Connect through the Harness Platform instead of a delegate

By default, the Spot connector connects through a Harness Delegate. Set execute_on_delegate to false to connect through the Harness Platform instead.


Next steps

Last updated

Was this helpful?