Databases
PostgreSQL Flexible Server
Hosts managed PostgreSQL databases with configurable compute, backups, and networking.
Naming rules
- Abbreviation
- Length
- 3–63
- Allowed characters
- Pattern: ^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*
- Uniqueness scope
- See resource reference
Azure Verified Modules naming utility v0.3.0 · AVM naming key flexible_server
Code examples
Adapt the examples to your environment and supply referenced resources and variables.
Terraform
Terraform documentationhcl
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
version = "~> 2.0"
}
}
}
variable "administratorLogin" {
type = string
}
variable "administratorPassword" {
sensitive = true
type = string
}
variable "location" {
type = string
}
variable "name" {
type = string
}
variable "parent_id" {
description = "Full Azure resource ID of the parent resource or resource group."
type = string
}
resource "azapi_resource" "example" {
type = "Microsoft.DBforPostgreSQL/flexibleServers@2026-10-01"
name = var.name
parent_id = var.parent_id
location = var.location
body = {
sku = {
name = "Standard_B1ms"
tier = "Burstable"
}
properties = {
version = "16"
administratorLogin = var.administratorLogin
administratorLoginPassword = var.administratorPassword
storage = {
storageSizeGB = 32
}
network = {
publicNetworkAccess = "Disabled"
}
}
}
}
Bicep
Bicep documentationbicep
param administratorLogin string
@secure()
param administratorPassword string
param location string
param name string
resource example 'Microsoft.DBforPostgreSQL/flexibleServers@2026-10-01' = {
name: name
location: location
sku: {
name: 'Standard_B1ms'
tier: 'Burstable'
}
properties: {
version: '16'
administratorLogin: administratorLogin
administratorLoginPassword: administratorPassword
storage: {
storageSizeGB: 32
}
network: {
publicNetworkAccess: 'Disabled'
}
}
}
ARM template
ARM template documentationjson
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"administratorLogin": {
"type": "string"
},
"administratorPassword": {
"type": "securestring"
},
"location": {
"type": "string"
},
"name": {
"type": "string"
}
},
"resources": [
{
"type": "Microsoft.DBforPostgreSQL/flexibleServers",
"apiVersion": "2026-10-01",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"sku": {
"name": "Standard_B1ms",
"tier": "Burstable"
},
"properties": {
"version": "16",
"administratorLogin": "[parameters('administratorLogin')]",
"administratorLoginPassword": "[parameters('administratorPassword')]",
"storage": {
"storageSizeGB": 32
},
"network": {
"publicNetworkAccess": "Disabled"
}
}
}
]
}
Private endpoints
Private endpoint target Microsoft.DBforPostgreSQL/flexibleServers.
Choose the group ID for the connection you need. Available groups and DNS records depend on the cloud, region, SKU, and enabled features.
Azure public cloud
- Target subresources (group IDs)
- Private DNS zones
- Public DNS zones to forward
Azure Government
- Target subresources (group IDs)
- Private DNS zones
- Public DNS zones to forward
Azure operated by 21Vianet (China)
- Target subresources (group IDs)
- Private DNS zones
- Public DNS zones to forward