CmdID / az / az postgres / az postgres flexible-server / az postgres flexible-server firewall-rule
az postgres flexible-server firewall-rule create
Create a new firewall rule for a flexible server. Azure CLI reference
3 examples Its page in the Azure CLI reference
Examples
Create a firewall rule allowing connections from a specific IP address.
az postgres flexible-server firewall-rule create --resource-group testGroup --server-name testserver --name allowip --start-ip-address 107.46.14.221Identify--resource-groupName of resource group.Create a firewall rule allowing connections from an IP address range.
az postgres flexible-server firewall-rule create --resource-group testGroup --server-name testserver --name allowiprange --start-ip-address 107.46.14.0 --end-ip-address 107.46.14.221Identify--resource-groupName of resource group.Create a firewall rule allowing connections to all Azure services
az postgres flexible-server firewall-rule create --resource-group testGroup --server-name testserver --name allowazureservices --start-ip-address 0.0.0.0Identify--resource-groupName of resource group.