---
title: "ezgh warehouse connections create"
description: "Create a connection."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh warehouse connections create

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh warehouse connections create <warehouse> <name> --type bucket|kafka|database [flags] [--wait]
```

Create a connection, so SQL can read from (and, for a bucket with readWrite, write to) something of yours without pasting keys: s3(&lt;name&gt;, …) for a bucket, ENGINE = Kafka(&lt;name&gt;) for a Hosted Queues Kafka cluster, postgresql(&lt;name&gt;, …) or mysql(&lt;name&gt;, …) for an EZGH Databases database.

```text
--type bucket    --bucket bkt_… --access read|readWrite
--type kafka     --cluster hqc_… [--topic-prefix p]
--type database  --database-instance dbi_… --database <logical database>
```

You need the target's own permissions: the connection creates a grant on the bucket, or a read-only Kafka or database user whose password goes in a Secret. A warehouse has one connection to each bucket. Kafka clusters and databases must be in the warehouse's VPC. Names are lowercase letters, digits and underscores, starting with a letter.

Part of [`ezgh warehouse connections`](/cli/reference/warehouse-connections).

## Examples

```sh
ezgh warehouse connections create analytics raw --type bucket --bucket bkt_4k2m9x0a7qpe --access read --wait
ezgh warehouse connections create analytics clicks --type kafka --cluster hqc_7d2k9m4p1q8x --topic-prefix clicks.
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--access` | string |  | a bucket's access: read or readWrite |
| `--bucket` | string |  | the Object Storage bucket (bkt\_…) |
| `--cluster` | string |  | the Hosted Queues Kafka cluster (hqc\_…) |
| `--database` | string |  | the logical database in it |
| `--database-instance` | string |  | the EZGH Databases database (dbi\_…) |
| `--topic-prefix` | string |  | only topics starting with this (Kafka) |
| `--type` | string |  | bucket, kafka or database |
| `--wait` | boolean |  | wait until every node has it |
| `--wait-timeout` | duration | `10m0s` | how long `--wait` waits |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/warehouse-connections-create/index.mdx
