Skip to content

Commit

Permalink
Dynamically set s2s url for prod and non prod envs (#2008)
Browse files Browse the repository at this point in the history
Co-authored-by: Tom Elliott <tomelliott@Toms-MacBook-Pro.local>
  • Loading branch information
tomxelliott and Tom Elliott authored Dec 11, 2024
1 parent 61fb02b commit fd8b950
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/utils/idam-lease-service-token.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ set -eu
microservice=${1}
oneTimePassword=${2}

s2sUrl=${S2S_URL_BASE:-http://rpe-service-auth-provider-aat.service.core-compute-aat.internal}/testing-support/lease

if [[ "${ENVIRONMENT}" == 'prod' ]]; then
s2sUrl=${S2S_URL_BASE:-http://rpe-service-auth-provider-aat.service.core-compute-aat.internal}/lease
fi

curl -v --insecure --fail --show-error --silent -X POST \
${S2S_URL_BASE:-http://rpe-service-auth-provider-aat.service.core-compute-aat.internal}/lease \
${s2sUrl} \
-H "Content-Type: application/json" \
-d '{
"microservice": "'${microservice}'",
Expand Down

0 comments on commit fd8b950

Please sign in to comment.