Skip to content

Commit 57abd7a

Browse files
authored
Merge pull request #214163 from pamelafox/postgres-firewall-cmd
Use postgres flexible server version of firewall command
2 parents 680a307 + bb06347 commit 57abd7a

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

articles/app-service/includes/tutorial-python-postgresql-app/add-access-to-postgres-from-web-app-cli.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,33 @@ ms.azure.devx-azure-tooling: ['azure-portal']
1010
ms.custom: devx-track-python
1111
---
1212

13-
Create a rule that allows other Azure services to connect to the PostgreSQL server by using the [az postgres server firewall-rule create](/cli/azure/postgres/server/firewall-rule) command.
13+
Create a rule that allows other Azure services to connect to the PostgreSQL server by using the [az postgres flexible-server firewall-rule create](/cli/azure/postgres/flexible-server/firewall-rule) command.
1414

1515
#### [bash](#tab/terminal-bash)
1616

1717
```azurecli
18-
az postgres server firewall-rule create --resource-group $RESOURCE_GROUP_NAME \
19-
--server $DB_SERVER_NAME \
20-
--name AllowAllWindowsAzureIps \
21-
--start-ip-address 0.0.0.0 \
22-
--end-ip-address 0.0.0.0
18+
az postgres flexible-server firewall-rule create \
19+
--resource-group $RESOURCE_GROUP_NAME \
20+
--name $DB_SERVER_NAME \
21+
--rule-name AllowAllWindowsAzureIps \
22+
--start-ip-address 0.0.0.0 \
23+
--end-ip-address 0.0.0.0
2324
```
2425

2526
#### [PowerShell terminal](#tab/terminal-powershell)
2627

2728
```azurecli
28-
az postgres server firewall-rule create --resource-group $RESOURCE_GROUP_NAME `
29-
--server $DB_SERVER_NAME `
30-
--name AllowAllWindowsAzureIps `
31-
--start-ip-address 0.0.0.0 `
32-
--end-ip-address 0.0.0.0
29+
az postgres flexible-server firewall-rule create `
30+
--resource-group $RESOURCE_GROUP_NAME `
31+
--name $DB_SERVER_NAME `
32+
--rule-name AllowAllWindowsAzureIps `
33+
--start-ip-address 0.0.0.0 `
34+
--end-ip-address 0.0.0.0
3335
```
3436

3537
---
3638

3739
* *resource-group* → Name of resource group from earlier in this tutorial. (`msdocs-python-postgres-webapp-rg`)
38-
* *server* → Name of the server from **Step 1**. (`msdocs-python-postgres-webapp-db`)
39-
* *name* → Name for firewall rule. (use `AllowAllWindowsAzureIps`)
40+
* *name* → Name of the server from **Step 1**. (`msdocs-python-postgres-webapp-db`)
41+
* *rule-name* → Name for firewall rule. (use `AllowAllWindowsAzureIps`)
4042
* *start-ip-address, end-ip-address* → `0.0.0.0` signals that access will be from other Azure services. This is sufficient for a demonstration app, but for a production app you should use an [Azure Virtual Network](../../../virtual-network/virtual-networks-overview.md).

0 commit comments

Comments
 (0)