Connecting to Hazelcast Viridian Cloud with Hazelcast CLC

To use the Hazelcast CLC with Hazelcast Viridian Cloud, you need to authenticate with Viridian Cloud using your API secret and key. You can then import the configuration of the cluster that you want to connect to. No additional configuration is required.

Before you Begin

You need the following:

Authenticating with Viridian Cloud

To allow the Hazelcast CLC to do cluster operations, you must generate a Viridian Cloud token.

  1. Execute the following command to retrieve the token.

    clc viridian login
  2. When prompted, enter your API key and secret. If both are correct, the token is retrieved and saved.

List Accessible Clusters

Run the following command to list the clusters linked to your Viridian Cloud account:

clc viridian list-clusters

For each cluster, the following attributes are displayed in order: Cluster ID, Cluster Name, Current Status, Hazelcast Version.

Importing the Cluster Configuration

Import the configuration of the Viridian Cloud cluster that you want to connect to.

  1. Run the following command to save the cluster configuration with the name dev. Replace the $CLUSTER_NAME placeholder with the name of your cluster.

    clc viridian import-config $CLUSTER-NAME --name dev
  2. Start an interactive shell session.

    clc -c dev

The Hazelcast CLC will start in interactive mode, and you should see a command prompt. You’re ready to start managing Viridian Cloud clusters.

The Hazelcast CLC connects to the cluster on demand, that is when you issue a command that requires the connection, such as running a SQL query.