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 serverGroupsv2 resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DBforPostgreSQL/serverGroupsv2 resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.DBforPostgreSQL/serverGroupsv2@2022-11-08' = {
scope: resourceSymbolicName or scope
location: 'string'
name: 'string'
properties: {
administratorLoginPassword: 'string'
citusVersion: 'string'
coordinatorEnablePublicIpAccess: bool
coordinatorServerEdition: 'string'
coordinatorStorageQuotaInMb: int
coordinatorVCores: int
enableHa: bool
enableShardsOnCoordinator: bool
maintenanceWindow: {
customWindow: 'string'
dayOfWeek: int
startHour: int
startMinute: int
}
nodeCount: int
nodeEnablePublicIpAccess: bool
nodeServerEdition: 'string'
nodeStorageQuotaInMb: int
nodeVCores: int
pointInTimeUTC: 'string'
postgresqlVersion: 'string'
preferredPrimaryZone: 'string'
sourceLocation: 'string'
sourceResourceId: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.DBforPostgreSQL/serverGroupsv2
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 40 Pattern = ^(?![0-9]+$)(?!-)[a-z0-9-]{3,40}(?<!-)$ (required) |
| properties | Properties of the cluster. | ClusterProperties |
| scope | Use when creating a resource at a scope that is different than the deployment scope. | Set this property to the symbolic name of a resource to apply the extension resource. |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
ClusterProperties
| Name | Description | Value |
|---|---|---|
| administratorLoginPassword | The password of the administrator login. Required for creation. | string Constraints: Sensitive value. Pass in as a secure parameter. |
| citusVersion | The Citus extension version on all cluster servers. | string |
| coordinatorEnablePublicIpAccess | If public access is enabled on coordinator. | bool |
| coordinatorServerEdition | The edition of a coordinator server (default: GeneralPurpose). Required for creation. | string |
| coordinatorStorageQuotaInMb | The storage of a server in MB. Required for creation. See /azure/cosmos-db/postgresql/resources-compute for more information. | int |
| coordinatorVCores | The vCores count of a server (max: 96). Required for creation. See /azure/cosmos-db/postgresql/resources-compute for more information. | int |
| enableHa | If high availability (HA) is enabled or not for the cluster. | bool |
| enableShardsOnCoordinator | If distributed tables are placed on coordinator or not. Should be set to 'true' on single node clusters. Requires shard rebalancing after value is changed. | bool |
| maintenanceWindow | Maintenance window of a cluster. | MaintenanceWindow |
| nodeCount | Worker node count of the cluster. When node count is 0, it represents a single node configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent multi-node configuration. Node count value cannot be 1. Required for creation. | int |
| nodeEnablePublicIpAccess | If public access is enabled on worker nodes. | bool |
| nodeServerEdition | The edition of a node server (default: MemoryOptimized). | string |
| nodeStorageQuotaInMb | The storage in MB on each worker node. See /azure/cosmos-db/postgresql/resources-compute for more information. | int |
| nodeVCores | The compute in vCores on each worker node (max: 104). See /azure/cosmos-db/postgresql/resources-compute for more information. | int |
| pointInTimeUTC | Date and time in UTC (ISO8601 format) for cluster restore. | string |
| postgresqlVersion | The major PostgreSQL version on all cluster servers. | string |
| preferredPrimaryZone | Preferred primary availability zone (AZ) for all cluster servers. | string |
| sourceLocation | The Azure region of source cluster for read replica clusters. | string |
| sourceResourceId | The resource id of source cluster for read replica clusters. | string |
MaintenanceWindow
| Name | Description | Value |
|---|---|---|
| customWindow | Indicates whether custom maintenance window is enabled or not. | string |
| dayOfWeek | Preferred day of the week for maintenance window. | int |
| startHour | Start hour within preferred day of the week for maintenance window. | int |
| startMinute | Start minute within the start hour for maintenance window. | int |
TrackedResourceTags
| Name | Description | Value |
|---|
ARM template resource definition
The serverGroupsv2 resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DBforPostgreSQL/serverGroupsv2 resource, add the following JSON to your template.
{
"type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
"apiVersion": "2022-11-08",
"name": "string",
"location": "string",
"properties": {
"administratorLoginPassword": "string",
"citusVersion": "string",
"coordinatorEnablePublicIpAccess": "bool",
"coordinatorServerEdition": "string",
"coordinatorStorageQuotaInMb": "int",
"coordinatorVCores": "int",
"enableHa": "bool",
"enableShardsOnCoordinator": "bool",
"maintenanceWindow": {
"customWindow": "string",
"dayOfWeek": "int",
"startHour": "int",
"startMinute": "int"
},
"nodeCount": "int",
"nodeEnablePublicIpAccess": "bool",
"nodeServerEdition": "string",
"nodeStorageQuotaInMb": "int",
"nodeVCores": "int",
"pointInTimeUTC": "string",
"postgresqlVersion": "string",
"preferredPrimaryZone": "string",
"sourceLocation": "string",
"sourceResourceId": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.DBforPostgreSQL/serverGroupsv2
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2022-11-08' |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 40 Pattern = ^(?![0-9]+$)(?!-)[a-z0-9-]{3,40}(?<!-)$ (required) |
| properties | Properties of the cluster. | ClusterProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.DBforPostgreSQL/serverGroupsv2' |
ClusterProperties
| Name | Description | Value |
|---|---|---|
| administratorLoginPassword | The password of the administrator login. Required for creation. | string Constraints: Sensitive value. Pass in as a secure parameter. |
| citusVersion | The Citus extension version on all cluster servers. | string |
| coordinatorEnablePublicIpAccess | If public access is enabled on coordinator. | bool |
| coordinatorServerEdition | The edition of a coordinator server (default: GeneralPurpose). Required for creation. | string |
| coordinatorStorageQuotaInMb | The storage of a server in MB. Required for creation. See /azure/cosmos-db/postgresql/resources-compute for more information. | int |
| coordinatorVCores | The vCores count of a server (max: 96). Required for creation. See /azure/cosmos-db/postgresql/resources-compute for more information. | int |
| enableHa | If high availability (HA) is enabled or not for the cluster. | bool |
| enableShardsOnCoordinator | If distributed tables are placed on coordinator or not. Should be set to 'true' on single node clusters. Requires shard rebalancing after value is changed. | bool |
| maintenanceWindow | Maintenance window of a cluster. | MaintenanceWindow |
| nodeCount | Worker node count of the cluster. When node count is 0, it represents a single node configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent multi-node configuration. Node count value cannot be 1. Required for creation. | int |
| nodeEnablePublicIpAccess | If public access is enabled on worker nodes. | bool |
| nodeServerEdition | The edition of a node server (default: MemoryOptimized). | string |
| nodeStorageQuotaInMb | The storage in MB on each worker node. See /azure/cosmos-db/postgresql/resources-compute for more information. | int |
| nodeVCores | The compute in vCores on each worker node (max: 104). See /azure/cosmos-db/postgresql/resources-compute for more information. | int |
| pointInTimeUTC | Date and time in UTC (ISO8601 format) for cluster restore. | string |
| postgresqlVersion | The major PostgreSQL version on all cluster servers. | string |
| preferredPrimaryZone | Preferred primary availability zone (AZ) for all cluster servers. | string |
| sourceLocation | The Azure region of source cluster for read replica clusters. | string |
| sourceResourceId | The resource id of source cluster for read replica clusters. | string |
MaintenanceWindow
| Name | Description | Value |
|---|---|---|
| customWindow | Indicates whether custom maintenance window is enabled or not. | string |
| dayOfWeek | Preferred day of the week for maintenance window. | int |
| startHour | Start hour within preferred day of the week for maintenance window. | int |
| startMinute | Start minute within the start hour for maintenance window. | int |
TrackedResourceTags
| Name | Description | Value |
|---|
Usage Examples
Terraform (AzAPI provider) resource definition
The serverGroupsv2 resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DBforPostgreSQL/serverGroupsv2 resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DBforPostgreSQL/serverGroupsv2@2022-11-08"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
administratorLoginPassword = "string"
citusVersion = "string"
coordinatorEnablePublicIpAccess = bool
coordinatorServerEdition = "string"
coordinatorStorageQuotaInMb = int
coordinatorVCores = int
enableHa = bool
enableShardsOnCoordinator = bool
maintenanceWindow = {
customWindow = "string"
dayOfWeek = int
startHour = int
startMinute = int
}
nodeCount = int
nodeEnablePublicIpAccess = bool
nodeServerEdition = "string"
nodeStorageQuotaInMb = int
nodeVCores = int
pointInTimeUTC = "string"
postgresqlVersion = "string"
preferredPrimaryZone = "string"
sourceLocation = "string"
sourceResourceId = "string"
}
}
}
Property Values
Microsoft.DBforPostgreSQL/serverGroupsv2
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 40 Pattern = ^(?![0-9]+$)(?!-)[a-z0-9-]{3,40}(?<!-)$ (required) |
| parent_id | The ID of the resource to apply this extension resource to. | string (required) |
| properties | Properties of the cluster. | ClusterProperties |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.DBforPostgreSQL/serverGroupsv2@2022-11-08" |
ClusterProperties
| Name | Description | Value |
|---|---|---|
| administratorLoginPassword | The password of the administrator login. Required for creation. | string Constraints: Sensitive value. Pass in as a secure parameter. |
| citusVersion | The Citus extension version on all cluster servers. | string |
| coordinatorEnablePublicIpAccess | If public access is enabled on coordinator. | bool |
| coordinatorServerEdition | The edition of a coordinator server (default: GeneralPurpose). Required for creation. | string |
| coordinatorStorageQuotaInMb | The storage of a server in MB. Required for creation. See /azure/cosmos-db/postgresql/resources-compute for more information. | int |
| coordinatorVCores | The vCores count of a server (max: 96). Required for creation. See /azure/cosmos-db/postgresql/resources-compute for more information. | int |
| enableHa | If high availability (HA) is enabled or not for the cluster. | bool |
| enableShardsOnCoordinator | If distributed tables are placed on coordinator or not. Should be set to 'true' on single node clusters. Requires shard rebalancing after value is changed. | bool |
| maintenanceWindow | Maintenance window of a cluster. | MaintenanceWindow |
| nodeCount | Worker node count of the cluster. When node count is 0, it represents a single node configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent multi-node configuration. Node count value cannot be 1. Required for creation. | int |
| nodeEnablePublicIpAccess | If public access is enabled on worker nodes. | bool |
| nodeServerEdition | The edition of a node server (default: MemoryOptimized). | string |
| nodeStorageQuotaInMb | The storage in MB on each worker node. See /azure/cosmos-db/postgresql/resources-compute for more information. | int |
| nodeVCores | The compute in vCores on each worker node (max: 104). See /azure/cosmos-db/postgresql/resources-compute for more information. | int |
| pointInTimeUTC | Date and time in UTC (ISO8601 format) for cluster restore. | string |
| postgresqlVersion | The major PostgreSQL version on all cluster servers. | string |
| preferredPrimaryZone | Preferred primary availability zone (AZ) for all cluster servers. | string |
| sourceLocation | The Azure region of source cluster for read replica clusters. | string |
| sourceResourceId | The resource id of source cluster for read replica clusters. | string |
MaintenanceWindow
| Name | Description | Value |
|---|---|---|
| customWindow | Indicates whether custom maintenance window is enabled or not. | string |
| dayOfWeek | Preferred day of the week for maintenance window. | int |
| startHour | Start hour within preferred day of the week for maintenance window. | int |
| startMinute | Start minute within the start hour for maintenance window. | int |
TrackedResourceTags
| Name | Description | Value |
|---|
Usage Examples
Terraform Samples
A basic example of deploying Azure Cosmos DB for PostgreSQL Cluster.
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 = "westeurope"
}
variable "administrator_login_password" {
type = string
description = "The administrator login password for the PostgreSQL server group"
sensitive = true
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "serverGroupsv2" {
type = "Microsoft.DBforPostgreSQL/serverGroupsv2@2022-11-08"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
administratorLoginPassword = var.administrator_login_password
coordinatorEnablePublicIpAccess = true
coordinatorServerEdition = "GeneralPurpose"
coordinatorStorageQuotaInMb = 131072
coordinatorVCores = 2
enableHa = false
nodeCount = 0
nodeEnablePublicIpAccess = false
nodeServerEdition = "MemoryOptimized"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}