Skip to content

Commit

Permalink
fix(get-fileshare-signed-url) ensure the script is re-entrant to allo…
Browse files Browse the repository at this point in the history
…w concurent calls (#854)

* fix(get-fileshare-signed-url) ensure the script is re-entrant to allow concurent calls

Signed-off-by: Damien Duportal <[email protected]>

* Update resources/get-fileshare-signed-url.sh

Co-authored-by: Hervé Le Meur <[email protected]>

---------

Signed-off-by: Damien Duportal <[email protected]>
Co-authored-by: Hervé Le Meur <[email protected]>
  • Loading branch information
dduportal and lemeurherve authored May 3, 2024
1 parent 76c8a83 commit 0d4b15d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resources/get-fileshare-signed-url.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ set +x

: "${STORAGE_FILESHARE?}" "${STORAGE_NAME?}" "${STORAGE_DURATION_IN_MINUTE?}" "${STORAGE_PERMISSIONS?}"

# Ensure the script is re-entrant by using unique temporary `az` configuration directory for each call
# Ref. https://learn.microsoft.com/en-us/cli/azure/use-azure-cli-successfully?tabs=bash%2Cbash2#concurrent-execution
AZURE_CONFIG_DIR="$(mktemp -d)"
export AZURE_CONFIG_DIR

accountKeyArg=()
shouldLogout="true"
# If a storage account key env var exists, use it instead of a service principal to generate a file share SAS token
Expand Down

0 comments on commit 0d4b15d

Please sign in to comment.