-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
96 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT license. | ||
ENVCODE=$1 | ||
|
||
SYNAPSE_STORAGE_ACCT=$(az storage account list --query "[?tags.store && tags.store == 'synapse'].name" -o tsv -g $1-pipeline-rg) | ||
echo $SYNAPSE_STORAGE_ACCT | ||
|
||
if [[ -n $SYNAPSE_STORAGE_ACCT ]] | ||
then | ||
echo 'Approving Synapse managed private end points' | ||
# check if any private endpoint connection needs approval for the synapse storage account | ||
PRIVATE_ENDPOINT_CONNECTION=$(az network private-endpoint-connection list -g $1-pipeline-rg -n $SYNAPSE_STORAGE_ACCT --type Microsoft.Storage/storageAccounts --query "[0]" -ojson) | ||
if [[ -n $PRIVATE_ENDPOINT_CONNECTION ]] | ||
then | ||
PRIVATE_ENDPOINT_CONNECTION_ID=$(echo $PRIVATE_ENDPOINT_CONNECTION | jq -r '.id') | ||
if [[ -n $PRIVATE_ENDPOINT_CONNECTION_ID ]] | ||
then | ||
PRIVATE_ENDPOINT_CONNECTION_STATUS=$(echo $PRIVATE_ENDPOINT_CONNECTION | jq -r '.properties.privateLinkServiceConnectionState.status') | ||
if [[ $PRIVATE_ENDPOINT_CONNECTION_STATUS != "Approved" ]] | ||
then | ||
az network private-endpoint-connection approve \ | ||
--id $PRIVATE_ENDPOINT_CONNECTION_ID --description "Approved by script" | ||
echo 'Note: Managed Private end points takes time to be effective. Please verify in Synapse Studio before continuing with configure.sh' | ||
fi | ||
fi | ||
fi | ||
fi | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters