Skip to main content
Version: v2.x

Hasura CLI: connector create

Create a new Hasura Cloud Data Connector.

Synopsis

This command triggers deployment of a custom Hasura Data Connector agent to Hasura Cloud. The source of the connector is fetched from the GitHub repository provided to the flag --github-repo-url. Please note:

Further Reading:

hasura connector create [connector-name] [flags]

Examples

# source code for the connector is at HEAD of the main branch
hasura connector create my-connector:v1 --github-repo-url https://github.com/hasura/weaviate_gdc/tree/main

# source code for the connector is at HEAD of a custom branch, eg - abhinav/fix_in_operator
hasura connector create my-connector:v2 --github-repo-url https://github.com/hasura/weaviate_gdc/tree/abhinav/fix_in_operator

# source code for the connector is at commit ref, eg - 93e644c87567c44e7dced66362fa7100f5a93042
hasura connector create my-connector:v3 --github-repo-url https://github.com/hasura/weaviate_gdc/tree/93e644c87567c44e7dced66362fa7100f5a93042

# (optional) connector configuration file (config.json) located at '/home/user/config.json'
hasura connector create my-connector:v4 --github-repo-url https://github.com/hasura/weaviate_gdc/tree/abhinav/fix_in_operator --config-file /home/user/config.json

# Add env vars to the deployed connector
hasura connector create my-connector:v1 --github-repo-url https://github.com/hasura/weaviate_gdc/tree/main --env URL=http://example.com -e DB_CREDENTIALS=postgres://user:pass@host:port/db

# Mount a volume in the connector (the file '/home/user/secrets.json' in user machine to be mounted at '/etc/connector/config.json' in the connector deployment)
hasura connector create my-connector:v1 --github-repo-url https://github.com/hasura/weaviate_gdc/tree/main --volume /home/user/secrets.json:/etc/connector/config.json

Options

-c, --config-file string       path to the configuration file
-e, --env stringArray Set environment variables
--github-repo-url string url of the github repo which contains connector source code
-h, --help help for create
-v, --volume string mount a folder in the container. Use docker syntax of <host-dir-path>:<container-target-path>

SEE ALSO

Auto generated by spf13/cobra