Skip to content

Commit

Permalink
chore: collect metrics jobs to secretsmanager
Browse files Browse the repository at this point in the history
JIRA:CLOUDSEC-12
  • Loading branch information
katebygrace committed May 9, 2024
1 parent 8c2d2fe commit 0c9d5df
Showing 1 changed file with 12 additions and 3 deletions.
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")" \
--pass_file "$(cat "rsa_key_passphrase_snowflake_task_automation_user")"


rm rsa_key_snowflake_task_automation_user
rm rsa_key_passphrase_snowflake_task_automation_user

0 comments on commit 0c9d5df

Please sign in to comment.