Skip to content

Commit 6727e87

Browse files
authored
Merge pull request #269281 from GennadNY/gennadyk-branch24
Gennadyk branch24
2 parents 80a135e + f9923e1 commit 6727e87

File tree

5 files changed

+100
-17
lines changed

5 files changed

+100
-17
lines changed

articles/postgresql/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,8 @@
331331
items:
332332
- name: Azure portal
333333
href: flexible-server/how-to-manage-virtual-network-private-endpoint-portal.md
334+
- name: Azure CLI
335+
href: flexible-server/how-to-manage-virtual-network-private-endpoint-cli.md
334336
- name: Connect to managed data factory via Private Endpoint
335337
href: flexible-server/how-to-connect-to-data-factory-private-endpoint.md
336338
- name: Public access (allowed IP addresses)

articles/postgresql/flexible-server/concepts-networking-private-link.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ ms.custom:
1212
ms.topic: conceptual
1313
---
1414

15-
# Azure Database for PostgreSQL - Flexible Server networking with Private Link - Preview
15+
# Azure Database for PostgreSQL - Flexible Server networking with Private Link
1616

1717
**Azure Private Link** allows you to create private endpoints for Azure Database for PostgreSQL flexible server to bring it inside your Virtual Network (virtual network). That functionality is introduced **in addition** to already [existing networking capabilities provided by VNET Integration](./concepts-networking-private.md), which is currently in general availability with Azure Database for PostgreSQL flexible server. With **Private Link**, traffic between your virtual network and the service travels the Microsoft backbone network. Exposing your service to the public internet is no longer necessary. You can create your own private link service in your virtual network and deliver it to your customers. Setup and consumption using Azure Private Link is consistent across Azure PaaS, customer-owned, and shared partner services.
1818

19-
> [!NOTE]
20-
> Azure Database for PostgreSQL flexible server supports Private Link based networking in Preview.
19+
20+
21+
2122

2223
Private Link is exposed to users through two Azure resource types:
2324

@@ -31,10 +32,6 @@ For a list to PaaS services that support Private Link functionality, review the
3132

3233
The same public service instance can be referenced by multiple private endpoints in different VNets/subnets, even if they belong to different users/subscriptions (including within differing Microsoft Entra ID tenants) or if they have overlapping address spaces.
3334

34-
> [!NOTE]
35-
> **Important Prerequisite:** Azure Database for PostgreSQL flexible server support for Private Endpoints in Preview requires enablement of [**Azure Database for PostgreSQL flexible server Private Endpoint capability** preview feature in your subscription](../../azure-resource-manager/management/preview-features.md).
36-
> Only **after preview feature is enabled** you can create servers which are PE capable, i.e. can be networked using Private Link.
37-
3835

3936
## Key Benefits of Azure Private Link
4037

@@ -56,25 +53,25 @@ Clients can connect to the private endpoint from the same VNet, peered VNet in s
5653

5754
### Limitations and Supported Features for Private Link Preview with Azure Database for PostgreSQL flexible server
5855

59-
In Preview of Private Endpoint for Azure Database for PostgreSQL flexible server, there are certain limitations as explain in cross feature availability matrix below.
6056

61-
Cross Feature Availability Matrix for preview of Private Endpoint in Azure Database for PostgreSQL flexible server.
57+
Cross Feature Availability Matrix for Private Endpoint in Azure Database for PostgreSQL flexible server.
6258

6359
| **Feature** | **Availability** | **Notes** |
6460
| --- | --- | --- |
6561
| High Availability (HA) | Yes |Works as designed |
66-
| Read Replica | No | |
62+
| Read Replica | Yes | **Limitation: support replica site swap only with single replica.**|
6763
| Point in Time Restore (PITR) | Yes |Works as designed |
6864
| Allowing also public/internet access with firewall rules | Yes | Works as designed|
6965
| Major Version Upgrade (MVU) | Yes | Works as designed |
7066
| Microsoft Entra Authentication (Entra Auth) | Yes | Works as designed |
7167
| Connection pooling with PGBouncer | Yes | Works as designed |
7268
| Private Endpoint DNS | Yes | Works as designed and [documented](../../private-link/private-endpoint-dns.md) |
69+
| Encryption with Customer Managed Keys (CMK)| Yes| Works as designed|
7370

7471

7572
### Connect from an Azure VM in Peered Virtual Network
7673

77-
Configure [VNet peering](../../virtual-network/tutorial-connect-virtual-networks-powershell.md) to establish connectivity to Azure Database for PostgreSQL flexible server from an Azure VM in a peered VNet.
74+
Configure [virtual network peering](../../virtual-network/tutorial-connect-virtual-networks-powershell.md) to establish connectivity to Azure Database for PostgreSQL flexible server from an Azure VM in a peered virtual network.
7875

7976
### Connect from an Azure VM in VNet-to-VNet environment
8077

@@ -89,11 +86,12 @@ To establish connectivity from an on-premises environment to the Azure Database
8986

9087
## Network Security and Private Link
9188

92-
When you use private endpoints, traffic is secured to a **private-link resource**. The platform validates network connections, allowing only those that reach the specified private-link resource. To access more subresources within the same Azure service, more private endpoints with corresponding targets are required. In the case of Azure Storage, for instance, you would need separate private endpoints to access the file and blob subresources.
89+
When you use private endpoints, traffic is secured to a **private-link resource**. The platform validates network connections, allowing only those connections that reach the specified private-link resource. To access more subresources within the same Azure service, more private endpoints with corresponding targets are required. In the case of Azure Storage, for instance, you would need separate private endpoints to access the file and blob subresources.
9390

9491
**Private endpoints** provide a privately accessible IP address for the Azure service, but don't necessarily restrict public network access to it. All other Azure services require another [access controls](../../event-hubs/event-hubs-ip-filtering.md), however. These controls provide an extra network security layer to your resources, providing protection that helps prevent access to the Azure service associated with the private-link resource.
9592

9693
Private endpoints support network policies. Network policies enable support for Network Security Groups (NSG), User Defined Routes (UDR), and Application Security Groups (ASG). For more information about enabling network policies for a private endpoint, see [Manage network policies for private endpoints](../../private-link/disable-private-endpoint-network-policy.md). To use an ASG with a private endpoint, see [Configure an application security group (ASG) with a private endpoint](../../private-link/configure-asg-private-endpoint.md).
94+
9795
## Private Link and DNS
9896

9997
When using a private endpoint, you need to connect to the same Azure service but use the private endpoint IP address. The intimate endpoint connection requires separate DNS settings to resolve the private IP address to the resource name.
@@ -102,6 +100,8 @@ Private DNS zones provide domain name resolution within a virtual network withou
102100
Private DNS zones provide separate DNS zone names for each Azure service. For example, if you configured a private DNS zone for the storage account blob service in the previous image, the DNS zones name is **privatelink.blob.core.windows.net**. Check out the Microsoft documentation here to see more of the private DNS zone names for all Azure services.
103101
> [!NOTE]
104102
> Private endpoint private DNS zone configurations will only automatically generate if you use the recommended naming scheme: **privatelink.postgres.database.azure.com**
103+
> On newly provisioned public access (non VNET injected) servers there is a temporary DNS layout change. The server's FQDN will now be a CName, resolving to A record, in format **servername.privatelink.postgres.database.azure.com**. In the near future, this format will apply only when private endpoints are created on the server.
104+
105105

106106
## Private Link and Network Security Groups
107107

@@ -126,10 +126,10 @@ The following situations and outcomes are possible when you use Private Link in
126126

127127
## Troubleshooting connectivity issues with Private Endpoint based networking
128128

129-
Following are basic areas to check if you are having connectivity issues using Private Endpoint based networking:
129+
Following are basic areas to check if you're having connectivity issues using Private Endpoint based networking:
130130

131131
1. **Verify IP Address Assignments:** Check that the private endpoint has the correct IP address assigned and that there are no conflicts with other resources. For more information on private endpoint and IP see this [doc](../../private-link/manage-private-endpoint.md)
132-
2. **Check Network Security Groups (NSGs):** Review the NSG rules for the private endpoint's subnet to ensure the necessary traffic is allowed and does not have conflicting rules. For more information on NSG see this [doc](../../virtual-network/network-security-groups-overview.md)
132+
2. **Check Network Security Groups (NSGs):** Review the NSG rules for the private endpoint's subnet to ensure the necessary traffic is allowed and doesn't have conflicting rules. For more information on NSG see this [doc](../../virtual-network/network-security-groups-overview.md)
133133
3. **Validate Route Table Configuration:** Ensure the route tables associated with the private endpoint's subnet and the connected resources are correctly configured with the appropriate routes.
134134
4. **Use Network Monitoring and Diagnostics:** Leverage Azure Network Watcher to monitor and diagnose network traffic using tools like Connection Monitor or Packet Capture. For more information on network diagnostics see this [doc](../../network-watcher/network-watcher-overview.md)
135135

articles/postgresql/flexible-server/concepts-networking-private.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ Here are some concepts to be familiar with when you're using virtual networks wh
5252

5353
> [!IMPORTANT]
5454
> The names `AzureFirewallSubnet`, `AzureFirewallManagementSubnet`, `AzureBastionSubnet`, and `GatewaySubnet` are reserved within Azure. Don't use any of these as your subnet name.
55-
> For Azure Storage connection please make sure the Azure Database for PostgreSQL flexible server delegated subnet has Service Endpoints for Azure Storage in the region of the VNet. The endpoints are created by default, but please take care not to remove these manually.
5655
5756
* **Network security group (NSG)**. Security rules in NSGs enable you to filter the type of network traffic that can flow in and out of virtual network subnets and network interfaces. For more information, see the [NSG overview](../../virtual-network/network-security-groups-overview.md).
5857

@@ -134,7 +133,7 @@ Use [Azure Virtual Network Manager (AVNM)](../../virtual-network-manager/overvie
134133

135134
Frequently customers have a need to connect to clients different Azure regions. More specifically, this question typically boils down to how to connect two VNETs (one of which has Azure Database for PostgreSQL - Flexible Server and another application client) that are in different regions.
136135
There are multiple ways to achieve such connectivity, some of which are:
137-
* **[Global VNET peering](../../virtual-network/virtual-network-peering-overview.md)**. Most common methodology, as its is the easiest way to connect networks in different regions together. Global VNET peering creates a connection over the Azure backbone directly between the two peered VNETs. This provides best network throughput and lowest latencies for connectivity using this method. When VNETs are peered, Azure will also handle the routing automatically for you, these VNETs can communicate with all resources in the peered VNET, established on a VPN gateway.
136+
* **[Global VNET peering](../../virtual-network/virtual-network-peering-overview.md)**. Most common methodology, as it's the easiest way to connect networks in different regions together. Global VNET peering creates a connection over the Azure backbone directly between the two peered VNETs. This provides best network throughput and lowest latencies for connectivity using this method. When VNETs are peered, Azure will also handle the routing automatically for you, these VNETs can communicate with all resources in the peered VNET, established on a VPN gateway.
138137
* **[VNET-to-VNET connection](../../vpn-gateway/vpn-gateway-howto-vnet-vnet-resource-manager-portal.md)**. A VNET-to-VNET connection is essentially a VPN between the two different Azure locations. The VNET-to-VNET connection is established on a VPN gateway. This means your traffic incurs two additional traffic hops as compared to global VNET peering. There's also additional latency and lower bandwidth as compared to that method.
139138
* **[Communication via network appliance in Hub and Spoke architecture](#using-hub-and-spoke-private-networking-design)**.
140139
Instead of connecting spoke virtual networks directly to each other, you can use network appliances to forward traffic between spokes. Network appliances provide more network services like deep packet inspection and traffic segmentation or monitoring, but they can introduce latency and performance bottlenecks if they're not properly sized.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: Manage virtual networks with Private Link - CLI
3+
description: Create an Azure Database for PostgreSQL - Flexible Server instance with public access by using the Azure CLI, and add private networking to the server based on Azure Private Link.
4+
author: gennadNY
5+
ms.author: gennadyk
6+
ms.service: postgresql
7+
ms.subservice: flexible-server
8+
ms.custom:
9+
- ignite-2023
10+
ms.topic: how-to
11+
ms.date: 03/12/2024
12+
---
13+
14+
15+
# Create and manage virtual networks with Private Link for Azure Database for PostgreSQL - Flexible Server by using the Azure CLI
16+
17+
[!INCLUDE [applies-to-postgresql-flexible-server](../includes/applies-to-postgresql-flexible-server.md)]
18+
19+
Azure Database for PostgreSQL flexible server supports two types of mutually exclusive network connectivity methods to connect to your Azure Database for PostgreSQL flexible server instance. The two options are:
20+
21+
* Public access through allowed IP addresses. You can further secure that method by using [Azure Private Link](./concepts-networking-private-link.md)-based networking with Azure Database for PostgreSQL flexible server. The feature is in preview.
22+
* Private access through virtual network integration.
23+
24+
This article focuses on creating an Azure Database for PostgreSQL flexible server instance with public access (allowed IP addresses) by using the Azure portal. You can then help secure the server by adding private networking based on Private Link technology.
25+
26+
You can use [Private Link](../../private-link/private-link-overview.md) to access the following services over a private endpoint in your virtual network:
27+
28+
* Azure platform as a service (PaaS) services, such as Azure Database for PostgreSQL flexible server
29+
* Customer-owned or partner services that are hosted in Azure
30+
31+
Traffic between your virtual network and a service traverses the Microsoft backbone network, which eliminates exposure to the public internet.
32+
33+
34+
35+
## Prerequisites
36+
37+
To add an Azure Database for PostgreSQL flexible server instance to a virtual network by using Private Link, you need:
38+
39+
1. A [virtual network](../../virtual-network/quick-create-portal.md#create-a-virtual-network). The virtual network and subnet should be in the same region and subscription as your Azure Database for PostgreSQL flexible server instance.
40+
41+
Be sure to remove any locks (**Delete** or **Read only**) from your virtual network and all subnets before you add a server to the virtual network, because locks might interfere with operations on the network and DNS. You can reset the locks after server creation.
42+
43+
44+
2. You need to sign in to your account using the [az login](/cli/azure/reference-index#az-login) command. Note the **ID** property, which refers to **Subscription ID** for your Azure account.
45+
46+
```azurecli
47+
az login
48+
```
49+
50+
3. Select the specific subscription under your account using [az account set](/cli/azure/account#az-account-set) command. Make a note of the **ID** value from the **az login** output to use as the value for **subscription** argument in the command. If you have multiple subscriptions, choose the appropriate subscription in which the resource should be billed. To get all your subscription, use [az account list](/cli/azure/account#az-account-list).
51+
52+
```azurecli
53+
az account set --subscription <subscription id>
54+
```
55+
56+
## Create an Azure Database for PostgreSQL flexible server instance with a private endpoint
57+
58+
1. Create virtual network, private endpoint, private DNS zone and link it
59+
60+
You can follow this Azure networking [doc](../../private-link/create-private-endpoint-cli.md) to complete these steps.
61+
62+
2. Create PostgreSQL Flexible Server with no public access
63+
64+
```azurecli
65+
66+
az postgres flexible-server create --resource-group <resource_group_name> --name <server_name> --public-access 'None'
67+
```
68+
69+
3. Approve the specified private endpoint connection created in first step associated with a PostgreSQL flexible server.
70+
71+
```azurecli
72+
az postgres flexible-server private-endpoint-connection approve -g <resource_group> -s <server_name> -n <connection_name> --description "Approve connection"
73+
```
74+
75+
## Next steps
76+
77+
* Learn more about [networking in Azure Database for PostgreSQL flexible server with Private Link](./concepts-networking-private-link.md).
78+
* Understand more about [virtual network integration in Azure Database for PostgreSQL flexible server](./concepts-networking-private.md).
79+
80+

articles/postgresql/flexible-server/how-to-manage-virtual-network-private-endpoint-portal.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@ You can use [Private Link](../../private-link/private-link-overview.md) to acces
3030

3131
Traffic between your virtual network and a service traverses the Microsoft backbone network, which eliminates exposure to the public internet.
3232

33+
34+
3335
## Prerequisites
3436

3537
To add an Azure Database for PostgreSQL flexible server instance to a virtual network by using Private Link, you need:
3638

3739
* A [virtual network](../../virtual-network/quick-create-portal.md#create-a-virtual-network). The virtual network and subnet should be in the same region and subscription as your Azure Database for PostgreSQL flexible server instance.
3840

3941
Be sure to remove any locks (**Delete** or **Read only**) from your virtual network and all subnets before you add a server to the virtual network, because locks might interfere with operations on the network and DNS. You can reset the locks after server creation.
40-
* Registration of the [PostgreSQL private endpoint preview feature in your subscription](../../azure-resource-manager/management/preview-features.md).
42+
4143

4244
## Create an Azure Database for PostgreSQL flexible server instance with a private endpoint
4345

0 commit comments

Comments
 (0)