File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ FIREWALL_RULE_NAME="github-action-${DATABASE_NAME}"
44if [[ " $1 " == " open" ]]
55then
66 echo " $( date +" %Y-%m-%dT%H:%M:%S" ) Add the IP $IP_ADDRESS to the PostgreSQL server firewall on server $POSTGRES_SERVER_NAME for database $DATABASE_NAME "
7- az postgres flexible-server firewall-rule create --resource-group $CLUSTER_RESOURCE_GROUP_NAME --server- name $POSTGRES_SERVER_NAME --name " $FIREWALL_RULE_NAME " --start-ip-address $IP_ADDRESS --end-ip-address $IP_ADDRESS
7+ az postgres flexible-server firewall-rule create --resource-group $CLUSTER_RESOURCE_GROUP_NAME --name $POSTGRES_SERVER_NAME --rule -name " $FIREWALL_RULE_NAME " --start-ip-address $IP_ADDRESS --end-ip-address $IP_ADDRESS
88else
99 echo " $( date +" %Y-%m-%dT%H:%M:%S" ) Delete the IP $IP_ADDRESS from the PostgreSQL server firewall on server $POSTGRES_SERVER_NAME for database $DATABASE_NAME "
10- az postgres flexible-server firewall-rule delete --resource-group $CLUSTER_RESOURCE_GROUP_NAME --server- name $POSTGRES_SERVER_NAME --name " $FIREWALL_RULE_NAME " --yes
10+ az postgres flexible-server firewall-rule delete --resource-group $CLUSTER_RESOURCE_GROUP_NAME --name $POSTGRES_SERVER_NAME --rule -name " $FIREWALL_RULE_NAME " --yes
1111fi
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ echo "$(date +"%Y-%m-%dT%H:%M:%S") Granting $MANAGED_IDENTITY_NAME (Client ID: $
2525# and grant it the necessary permissions. The pgaadauth_create_principal function handles
2626# Entra ID principal creation in Azure Database for PostgreSQL Flexible Server.
2727ENTRA_USER=$( az postgres flexible-server microsoft-entra-admin list --resource-group $CLUSTER_RESOURCE_GROUP_NAME --server-name $POSTGRES_SERVER_NAME --query " [0].principalName" --output tsv)
28- PGPASSWORD=$ACCESS_TOKEN psql " host=$POSTGRES_HOST dbname=$DATABASE_NAME user='$ENTRA_USER ' sslmode=require" << EOF
28+ PGPASSWORD=$ACCESS_TOKEN psql -v ON_ERROR_STOP=1 " host=$POSTGRES_HOST dbname=$DATABASE_NAME user='$ENTRA_USER ' sslmode=require" << EOF
2929DO \$\$
3030BEGIN
3131 IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = '$MANAGED_IDENTITY_NAME ') THEN
Original file line number Diff line number Diff line change @@ -56,10 +56,11 @@ resource privateDnsZoneVnetLink 'Microsoft.Network/privateDnsZones/virtualNetwor
5656}
5757
5858resource privateEndpoint 'Microsoft.Network/privateEndpoints@2025-01-01' = {
59- name : '${name }-postgres-private-endpoint '
59+ name : '${name }-postgres'
6060 location : location
6161 tags : tags
6262 properties : {
63+ customNetworkInterfaceName : '${name }-postgres'
6364 subnet : {
6465 id : subnetId
6566 }
You can’t perform that action at this time.
0 commit comments