New --private-key-file flag for Meroxa CLI Commands
This is a legacy platform changelog. The information reflected here may not represent current functionality and some links may be broken.
We have introduced a new flag (--private-key-file) and an improved error message in the meroxa resources create
command with the latest Meroxa CLI release v2.18.0.
This new --private-key-file flag is related to the --ssh-private-key flag when setting up a resource with an SSH Tunnel. It is also related to the --password flag when setting up a Snowflake resource. The new --private-key-file flag is present alongside the existing --ssh-private-key and --password flags, but eventually we will deprecate both of those existing flags.
The --private-key-file flag is preferred as it reduces the chance of having a whitespace issue when creating a resource due to shell formatting of the private key value, and it prevents sensitive values from lingering in the shell history.
Using this flag when creating a resource with an SSH Tunnel looks like the following example:
$ meroxa resource create pg_db
--type postgres \
--url postgres://$PG_USER:$PG_PASS@$PG_URL:$PG_PORT/$PG_DB \
--ssh-url ssh://user@[email protected]:22 \
--private-key-file ~/.ssh/id_ed25519
Using this flag when creating a Snowflake resource looks like the following example:
$ meroxa resource create snowflake \
--type snowflakedb \
-u "snowflake://$SNOWFLAKE_URL/meroxa_db/stream_data" \
--username meroxa_user \
--private-key-file /Users/me/.ssh/id_rsa
In addition, if there is still somehow a formatting issue with the private key provided, you would have previously seen this error message from this command:
$ meroxa resource create snowflake \
--type snowflakedb \
-u "snowflake://$SNOWFLAKE_URL/meroxa_db/stream_data" \
--username meroxa_user \
--private-key-file /Users/me/.ssh/id_rsa
Creating "snowflake" resource in "common" environment...
Error: internal error
With all of these changes, we have updated the error message to be more actionable, as in the following example:
$ meroxa resource create snowflake \
--type snowflakedb \
-u "snowflake://$SNOWFLAKE_URL/meroxa_db/stream_data" \
--username meroxa_user \
--private-key-file /Users/me/.ssh/id_rsa
Creating "snowflake" resource in "common" environment...
Error: the private key provided is not formatted as expected. please review and try again
If you have feedback for us or additional questions on how to get started, feel free to join our Discord community or email us at [email protected]!
Follow us on Twitter.