Skip to content

Commit

Permalink
remove duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
sondresjolyst committed Sep 14, 2023
1 parent 18b4521 commit 19131b1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions scripts/acr/update_acr_whitelist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,12 @@ MASTER_ACR_IP_WHITELIST=$(az keyvault secret show \
--vault-name "${AZ_RESOURCE_KEYVAULT}" \
--name "${SECRET_NAME}" \
--query="value" \
--output tsv | base64 --decode | jq '{whitelist:.whitelist | unique_by(.ip) |sort_by(.location | ascii_downcase)}' 2>/dev/null)
--output tsv | base64 --decode | jq '{whitelist:.whitelist | unique_by(.ip) | sort_by(.location | ascii_downcase)}' 2>/dev/null)

#######################################################################################
### Run interactive wizard to modify IP whitelist
###

MASTER_ACR_IP_WHITELIST=$(az keyvault secret show \
--vault-name "${AZ_RESOURCE_KEYVAULT}" \
--name "${SECRET_NAME}" \
--query="value" \
--output tsv | base64 --decode | jq '{whitelist:.whitelist | unique_by(.ip) | sort_by(.location | ascii_downcase)}' 2>/dev/null)
temp_file_path="/tmp/$(uuidgen)"

if [[ -n "${IP_MASK}" ]]; then
Expand Down

0 comments on commit 19131b1

Please sign in to comment.