Back to Skills

cloud-setup

Configures Elastic Cloud authentication and environment defaults. Use when setting up EC_API_KEY, configuring Cloud API access, or when another cloud skill requires credentials.

532stars41forksUpdated 7/16/2026

Security Assessment

Medium Risk(50/100)

Detected risks:

Secret Exposure([SKILL.md] API_KEY=)
Sensitive File Access([SKILL.md] .env)
Security Score50/100

About cloud-setup

The cloud-setup skill configures Elastic Cloud authentication and environment defaults. It solves the prerequisite problem for the wider cloud skill family: all other cloud/* skills depend on this setup, so it establishes the EC_API_KEY credential and default environment values before any cloud operations run. It is intended for setting up EC_API_KEY, configuring Cloud API access, or when another cloud skill requires credentials. The workflow tracks three steps: verify the API key, set defaults, and validate the connection.

Step 1 checks whether EC_API_KEY is set (echo "${EC_API_KEY:?Not set}") and, if not, directs the user to generate a key at the Elastic Cloud API keys page, noting only Organization owners can create Cloud API keys and that the key should include Project Admin privileges or higher to manage serverless projects. Users without an account can start a 14-day free trial of Elastic Cloud Serverless with no credit card. The skill recommends creating a .env file in the project root (cloud/* scripts auto-load .env, which works in sandboxed agent shells) rather than terminal exports, which may not be visible to sandboxed agents. Step 2 exports EC_BASE_URL (default https://api.elastic-cloud.com) and EC_REGION (default gcp-us-central1), and can list available regions via the serverless/regions endpoint. Step 3 validates the connection by calling that endpoint with curl and reporting Authenticated or Authentication failed.

This skill targets developers and agents setting up Elastic Cloud access. It documents three environment variables: EC_API_KEY (required), EC_BASE_URL (optional), and EC_REGION (optional). It strongly emphasizes secret hygiene: never ask the user to paste an API key into the chat, and never echo or log credentials, since secrets must not appear in conversation history. It also advises that local secret files are acceptable for development but production or shared environments should use a centralized secrets manager such as HashiCorp Vault, AWS Secrets Manager, or 1Password CLI. Troubleshooting covers 401 Unauthorized (invalid or expired key) and connection refused (network access to api.elastic-cloud.com).

FAQ

What environment variables does this skill configure?

EC_API_KEY (required, the Elastic Cloud API key), EC_BASE_URL (optional, default https://api.elastic-cloud.com), and EC_REGION (optional, default gcp-us-central1).

How should I provide my API key?

Create a .env file in the project root with EC_API_KEY=your-api-key. The cloud/* scripts auto-load .env from the working directory, which works in sandboxed agent shells. Terminal exports may not be visible to sandboxed agents. You should never paste an API key into the chat.

What privileges does the Cloud API key need?

Only Organization owners can create and manage Cloud API keys. When creating the key, include Project Admin privileges or higher (Org Owner) so it can create and manage serverless projects.

How is the connection validated?

By calling the serverless regions endpoint with curl using the ApiKey authorization header; a successful call reports "Authenticated" and a failure reports "Authentication failed." If it fails, check that the key is valid and not expired and that there is network connectivity to api.elastic-cloud.com.

Do I need an existing Elastic Cloud account?

No. If you do not have an account, the skill proposes starting a free trial at Elastic Cloud, which provides 14 days of full access to Elastic Cloud Serverless with no credit card required, after which you generate the API key.

How should secrets be handled in production?

Local secret files are acceptable for development, but for production or shared environments the skill recommends a centralized secrets manager such as HashiCorp Vault, AWS Secrets Manager, or 1Password CLI to avoid secrets sprawl. Credentials should never be echoed or logged in the chat.

Install cloud-setup

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill