Microsoft.DBforPostgreSQL flexibleServers

The flexibleServers resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a Microsoft.DBforPostgreSQL/flexibleServers resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.DBforPostgreSQL/flexibleServers@2021-06-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  sku: {
    name: 'string'
    tier: 'string'
  properties: {
    administratorLogin: 'string'
    administratorLoginPassword: 'string'
    availabilityZone: 'string'
    backup: {
      backupRetentionDays: int
      geoRedundantBackup: 'string'
    createMode: 'string'
    highAvailability: {
      mode: 'string'
      standbyAvailabilityZone: 'string'
    maintenanceWindow: {
      customWindow: 'string'
      dayOfWeek: int
      startHour: int
      startMinute: int
    network: {
      delegatedSubnetResourceId: 'string'
      privateDnsZoneArmResourceId: 'string'
    pointInTimeUTC: 'string'
    sourceServerResourceId: 'string'
    storage: {
      storageSizeGB: int
    tags: {
      tagName1: 'tagValue1'
      tagName2: 'tagValue2'
    version: 'string'

Property values


Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
name The resource name string (required)
location The geo-location where the resource lives string (required)
tags Resource tags. Dictionary of tag names and values. See Tags in templates
sku Sku information related properties of a server. Sku
properties The properties of a server. ServerProperties


Name Description Value
administratorLogin The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). string
administratorLoginPassword The administrator login password (required for server creation). string
availabilityZone availability zone information of the server. string
backup Backup properties of a server Backup
createMode The mode to create a new PostgreSQL server. 'Create'
highAvailability High availability properties of a server HighAvailability
maintenanceWindow Maintenance window properties of a server. MaintenanceWindow
network Network properties of a server Network
pointInTimeUTC Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when 'createMode' is 'PointInTimeRestore'. string
sourceServerResourceId The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore'. string
storage Storage properties of a server Storage
tags Application-specific metadata in the form of key-value pairs. Dictionary of tag names and values. See Tags in templates
version The version of a server. '11'


Name Description Value
backupRetentionDays Backup retention days for the server. int
geoRedundantBackup A value indicating whether Geo-Redundant backup is enabled on the server. 'Disabled'


Name Description Value
mode The HA mode for the server. 'Disabled'
standbyAvailabilityZone availability zone information of the standby. string


Name Description Value
customWindow indicates whether custom window is enabled or disabled string
dayOfWeek day of week for maintenance window int
startHour start hour for maintenance window int
startMinute start minute for maintenance window int


Name Description Value
delegatedSubnetResourceId delegated subnet arm resource id. string
privateDnsZoneArmResourceId private dns zone arm resource id. string


Name Description Value
storageSizeGB Max storage allowed for a server. int


Name Description Value
name The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. string (required)
tier The tier of the particular SKU, e.g. Burstable. 'Burstable'