You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
14
14
15
15
#### [bash](#tab/terminal-bash)
16
16
17
17
```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 \
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
33
35
```
34
36
35
37
---
36
38
37
39
**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`)
40
42
**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