Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The flexibleServers/virtualendpoints resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints@2025-08-01' = {
parent: resourceSymbolicName
name: 'string'
properties: {
endpointType: 'string'
members: [
'string'
]
}
}
Property Values
Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints
| Name | Description | Value |
|---|---|---|
| name | The resource name | string Constraints: Min length = 3 Max length = 63 Pattern = ^[A-Za-z0-9][A-Za-z0-9-]{0,62}(?<!-)$ (required) |
| parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: flexibleServers |
| properties | Properties of the pair of virtual endpoints. | VirtualEndpointResourceProperties |
VirtualEndpointResourceProperties
| Name | Description | Value |
|---|---|---|
| endpointType | Type of endpoint for the virtual endpoints. | 'ReadWrite' |
| members | List of servers that one of the virtual endpoints can refer to. | string[] |
Usage Examples
Bicep Samples
A basic example of deploying Virtual Endpoint on a PostgreSQL Flexible Server.
param resourceName string = 'acctest0001'
param location string = 'westus'
@secure()
@description('The administrator login password for the PostgreSQL flexible server')
param administratorLoginPassword string
resource flexibleServer 'Microsoft.DBforPostgreSQL/flexibleServers@2024-08-01' = {
name: '${resourceName}-primary'
location: location
properties: {
administratorLogin: 'psqladmin'
administratorLoginPassword: null
availabilityZone: '1'
backup: {
geoRedundantBackup: 'Disabled'
}
highAvailability: {
mode: 'Disabled'
}
network: {
publicNetworkAccess: 'Disabled'
}
storage: {
autoGrow: 'Disabled'
storageSizeGB: 32
tier: 'P30'
}
version: '16'
}
sku: {
name: 'Standard_D2ads_v5'
tier: 'GeneralPurpose'
}
}
resource flexibleserver1 'Microsoft.DBforPostgreSQL/flexibleServers@2024-08-01' = {
name: '${resourceName}-replica'
location: location
properties: {
availabilityZone: '1'
backup: {
geoRedundantBackup: 'Disabled'
}
createMode: 'Replica'
highAvailability: {
mode: 'Disabled'
}
network: {
publicNetworkAccess: 'Disabled'
}
sourceServerResourceId: flexibleServer.id
storage: {
autoGrow: 'Disabled'
storageSizeGB: 32
tier: 'P30'
}
version: '16'
}
}
resource virtualEndpoint 'Microsoft.DBforPostgreSQL/flexibleServers/virtualEndpoints@2024-08-01' = {
parent: flexibleServer
name: resourceName
properties: {
endpointType: 'ReadWrite'
members: [
flexibleserver1.name
]
}
}
ARM template resource definition
The flexibleServers/virtualendpoints resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints resource, add the following JSON to your template.
{
"type": "Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints",
"apiVersion": "2025-08-01",
"name": "string",
"properties": {
"endpointType": "string",
"members": [ "string" ]
}
}
Property Values
Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2025-08-01' |
| name | The resource name | string Constraints: Min length = 3 Max length = 63 Pattern = ^[A-Za-z0-9][A-Za-z0-9-]{0,62}(?<!-)$ (required) |
| properties | Properties of the pair of virtual endpoints. | VirtualEndpointResourceProperties |
| type | The resource type | 'Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints' |
VirtualEndpointResourceProperties
| Name | Description | Value |
|---|---|---|
| endpointType | Type of endpoint for the virtual endpoints. | 'ReadWrite' |
| members | List of servers that one of the virtual endpoints can refer to. | string[] |
Usage Examples
Terraform (AzAPI provider) resource definition
The flexibleServers/virtualendpoints resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints@2025-08-01"
name = "string"
parent_id = "string"
body = {
properties = {
endpointType = "string"
members = [
"string"
]
}
}
}
Property Values
Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints
| Name | Description | Value |
|---|---|---|
| name | The resource name | string Constraints: Min length = 3 Max length = 63 Pattern = ^[A-Za-z0-9][A-Za-z0-9-]{0,62}(?<!-)$ (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: flexibleServers |
| properties | Properties of the pair of virtual endpoints. | VirtualEndpointResourceProperties |
| type | The resource type | "Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints@2025-08-01" |
VirtualEndpointResourceProperties
| Name | Description | Value |
|---|---|---|
| endpointType | Type of endpoint for the virtual endpoints. | 'ReadWrite' |
| members | List of servers that one of the virtual endpoints can refer to. | string[] |
Usage Examples
Terraform Samples
A basic example of deploying Virtual Endpoint on a PostgreSQL Flexible Server.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westus"
}
variable "administrator_login_password" {
type = string
sensitive = true
description = "The administrator login password for the PostgreSQL flexible server"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "flexibleServer" {
type = "Microsoft.DBforPostgreSQL/flexibleServers@2024-08-01"
parent_id = azapi_resource.resourceGroup.id
name = "${var.resource_name}-primary"
location = var.location
body = {
properties = {
administratorLogin = "psqladmin"
administratorLoginPassword = var.administrator_login_password
availabilityZone = "1"
backup = {
geoRedundantBackup = "Disabled"
}
highAvailability = {
mode = "Disabled"
}
network = {
publicNetworkAccess = "Disabled"
}
storage = {
autoGrow = "Disabled"
storageSizeGB = 32
tier = "P30"
}
version = "16"
}
sku = {
name = "Standard_D2ads_v5"
tier = "GeneralPurpose"
}
}
}
resource "azapi_resource" "flexibleServer_1" {
type = "Microsoft.DBforPostgreSQL/flexibleServers@2024-08-01"
parent_id = azapi_resource.resourceGroup.id
name = "${var.resource_name}-replica"
location = var.location
body = {
properties = {
availabilityZone = "1"
backup = {
geoRedundantBackup = "Disabled"
}
createMode = "Replica"
highAvailability = {
mode = "Disabled"
}
network = {
publicNetworkAccess = "Disabled"
}
sourceServerResourceId = azapi_resource.flexibleServer.id
storage = {
autoGrow = "Disabled"
storageSizeGB = 32
tier = "P30"
}
version = "16"
}
}
}
resource "azapi_resource" "virtualEndpoint" {
type = "Microsoft.DBforPostgreSQL/flexibleServers/virtualEndpoints@2024-08-01"
parent_id = azapi_resource.flexibleServer.id
name = var.resource_name
body = {
properties = {
endpointType = "ReadWrite"
members = [azapi_resource.flexibleServer_1.name]
}
}
}