File tree 1 file changed +2
-14
lines changed
1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -29,20 +29,8 @@ aws ecr describe-repositories --repository-names $FLOW_NAME --region us-east-1 |
29
29
# Do not print commands in this function since they may contain secrets.
30
30
set +x
31
31
32
- # Retrieve a vault token corresponding to the jenkins AppRole. The token is then stored in the VAULT_TOKEN variable
33
- # which is implicitly used by subsequent vault commands within this script.
34
- # Instructions followed: https://learn.hashicorp.com/tutorials/vault/approle#step-4-login-with-roleid-secretid
35
- export VAULT_TOKEN=$( vault write -field=token auth/approle/login \
36
- role_id=${ANALYTICS_VAULT_ROLE_ID} \
37
- secret_id=${ANALYTICS_VAULT_SECRET_ID}
38
- )
39
-
40
- PREFECT_CLOUD_AGENT_TOKEN=$(
41
- vault kv get \
42
- -version=${PREFECT_VAULT_KV_VERSION} \
43
- -field=PREFECT_CLOUD_AGENT_TOKEN \
44
- ${PREFECT_VAULT_KV_PATH} \
45
- )
32
+ # Fetch the secrets from AWS
33
+ PREFECT_CLOUD_AGENT_TOKEN=$( aws secretsmanager get-secret-value --secret-id analytics-secure/prefect-cd --region us-east-1 --query SecretString --output text | jq -r " .PREFECT_CLOUD_AGENT_TOKEN" )
46
34
47
35
# Get Authenticated with Prefect Cloud
48
36
prefect auth login --key $PREFECT_CLOUD_AGENT_TOKEN
You can’t perform that action at this time.
0 commit comments