Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Katebygrace/collect metrics secrets #1760

Merged
merged 1 commit into from
May 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 12 additions & 3 deletions dataeng/resources/snowflake-collect-metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@ source "${PYTHON_VENV}/bin/activate"
cd $WORKSPACE/analytics-tools/snowflake
make requirements

python3 secrets-manager.py -w -n analytics-secure/snowflake/rsa_key_snowflake_task_automation_user.p8 -v rsa_key_snowflake_task_automation_user
python3 secrets-manager.py -w -n analytics-secure/snowflake/rsa_key_passphrase_snowflake_task_automation_user -v rsa_key_passphrase_snowflake_task_automation_user



python collect-metrics.py \
--metric_name $METRIC_NAME \
--key_path $WORKSPACE/analytics-secure/snowflake/rsa_key_snowflake_task_automation_user.p8 \
--passphrase_path $WORKSPACE/analytics-secure/snowflake/rsa_key_passphrase_snowflake_task_automation_user \
--automation_user $SNOWFLAKE_USER \
--account $SNOWFLAKE_ACCOUNT \
--warehouse $SNOWFLAKE_WAREHOUSE
--warehouse $SNOWFLAKE_WAREHOUSE \
--key_file "$(cat "rsa_key_snowflake_task_automation_user")" \
--passphrase_file "$(cat "rsa_key_passphrase_snowflake_task_automation_user")"


rm rsa_key_snowflake_task_automation_user
rm rsa_key_passphrase_snowflake_task_automation_user