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 clusters 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.
Usage Examples
Bicep Samples
Create or replace a HorizonDB cluster.
@description('The name of the HorizonDB cluster')
param clusterName string = 'example-cluster'
resource horizonDbResource 'Microsoft.HorizonDb/clusters@2026-10-01-preview' = {
name: clusterName
location: 'eastus2'
tags: {
environment: 'production'
}
identity: {
type: 'UserAssigned'
userAssignedIdentities: {
'/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer': {
}
}
}
properties: {
postgreSqlVersion: '17'
network: {
publicAccess: 'Enabled'
}
backup: {
geoRedundancy: 'Enabled'
retentionDays: 14
}
}
}
Restore a HorizonDB cluster across Azure regions from the latest available backup.
@description('The name of the HorizonDB cluster')
param clusterName string = 'cross-region-restored-cluster'
resource horizonDbResource 'Microsoft.HorizonDb/clusters@2026-10-01-preview' = {
name: clusterName
location: 'westus2'
properties: {
creationMode: 'PointInTimeRestore'
pointInTimeUtc: '2026-07-27T12:00:00Z'
creationSourceClusterResourceId: '/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster'
creationSourceClusterLocation: 'eastus2'
network: {
publicAccess: 'Disabled'
}
backup: {
geoRedundancy: 'Enabled'
retentionDays: 14
}
}
}
Create a PostgreSQL 18 HorizonDB cluster with minimum configuration and service defaults.
@description('The name of the HorizonDB cluster')
param clusterName string = 'minimum-defaults'
resource horizonDbResource 'Microsoft.HorizonDb/clusters@2026-10-01-preview' = {
name: clusterName
location: 'eastus2'
properties: {
postgreSqlVersion: '18'
backup: {
geoRedundancy: 'Disabled'
}
}
}
Restore a HorizonDB cluster to a point in time.
@description('The name of the HorizonDB cluster')
param clusterName string = 'restored-cluster'
resource horizonDbResource 'Microsoft.HorizonDb/clusters@2026-10-01-preview' = {
name: clusterName
location: 'eastus2'
properties: {
creationMode: 'PointInTimeRestore'
pointInTimeUtc: '2026-07-27T12:00:00Z'
creationSourceClusterResourceId: '/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster'
network: {
publicAccess: 'Disabled'
}
backup: {
geoRedundancy: 'Enabled'
retentionDays: 14
}
}
}
Create a HorizonDB cluster with customer-managed key data encryption.
@description('The name of the HorizonDB cluster')
param clusterName string = 'example-cluster'
resource horizonDbResource 'Microsoft.HorizonDb/clusters@2026-10-01-preview' = {
name: clusterName
location: 'eastus2'
identity: {
type: 'UserAssigned'
userAssignedIdentities: {
'/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity': {
}
}
}
properties: {
postgreSqlVersion: '17'
backup: {
geoRedundancy: 'Disabled'
retentionDays: 14
}
dataEncryption: {
type: 'AzureKeyVault'
primaryKeyUri: 'https://primary-key-vault.vault.azure.net/keys/horizondb-primary-key'
primaryUserAssignedIdentityId: '/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity'
}
}
}
Update a HorizonDB cluster.
@description('The name of the HorizonDB cluster')
param clusterName string = 'example-cluster'
resource horizonDbResource 'Microsoft.HorizonDb/clusters@2026-10-01-preview' = {
name: clusterName
tags: {
environment: 'production'
team: 'data-platform'
}
properties: {
network: {
publicAccess: 'Disabled'
}
backup: {
retentionDays: 21
}
}
}
Rotate the customer-managed key used by a HorizonDB cluster.
@description('The name of the HorizonDB cluster')
param clusterName string = 'example-cluster'
resource horizonDbResource 'Microsoft.HorizonDb/clusters@2026-10-01-preview' = {
name: clusterName
properties: {
dataEncryption: {
primaryKeyUri: 'https://primary-key-vault.vault.azure.net/keys/horizondb-primary-key'
}
}
}
Resource format
To create a Microsoft.HorizonDb/clusters resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.HorizonDb/clusters@2026-10-01-preview' = {
identity: {
type: 'string'
userAssignedIdentities: {
{customized property}: {}
}
}
location: 'string'
name: 'string'
properties: {
aiModelManagement: 'string'
backup: {
geoRedundancy: 'string'
retentionDays: int
}
creationMode: 'string'
creationSourceClusterLocation: 'string'
creationSourceClusterResourceId: 'string'
dataEncryption: {
primaryKeyUri: 'string'
primaryUserAssignedIdentityId: 'string'
type: 'string'
}
network: {
publicAccess: 'string'
}
pointInTimeUtc: 'string'
postgreSqlVersion: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.HorizonDb/clusters
| Name | Description | Value |
|---|---|---|
| identity | The managed service identities assigned to this resource. Omitting the entire identity property from PUT or PATCH preserves all current assignments. When provided, PUT replaces the user-assigned identity set and PATCH merges it; null PATCH dictionary entries remove individual identities. Setting type to None clears all assignments. | HorizonDbClusterManagedServiceIdentity |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 1 Max length = 63 Pattern = ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$ (required) |
| properties | The resource-specific properties for this resource. | ClusterProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
BackupProperties
| Name | Description | Value |
|---|---|---|
| geoRedundancy | The geo-redundancy state. Geo-redundant backup is not supported when dataEncryption.type is AzureKeyVault. | 'Disabled' 'Enabled' (required) |
| retentionDays | The number of days that automatic backups are retained. The service defaults to 7 days when this property is omitted. | int Constraints: Min value = 1 Max value = 35 |
ClusterProperties
| Name | Description | Value |
|---|---|---|
| aiModelManagement | Specifies whether AI Model Management is enabled for the cluster. | 'Disabled' 'Enabled' |
| backup | The backup configuration for the cluster. | BackupProperties |
| creationMode | The mode used to create the cluster. When this property is omitted while creating a new cluster, the service records Create. PointInTimeRestore creates a new cluster from an available backup; pointInTimeUtc and creationSourceClusterResourceId are then required, postgreSqlVersion must be omitted because it is obtained from the backup metadata, and creationSourceClusterLocation is required when the source and target cluster locations differ. This property is immutable and is returned as creation provenance. On replacement, omission preserves the recorded value, resubmitting the same value is accepted, and changing it is rejected. | 'Create' 'PointInTimeRestore' |
| creationSourceClusterLocation | The Azure location of the source HorizonDB cluster used for point-in-time restore. This property is optional when the source and target cluster locations are the same. It is required when the source cluster location differs from the target cluster location and must identify the source cluster's location. This property must be absent for creation modes other than PointInTimeRestore or when creationMode is omitted. This immutable creation-provenance value does not change after creation. | string |
| creationSourceClusterResourceId | The Azure resource ID of the source HorizonDB cluster used by the selected creation mode. This property is required for PointInTimeRestore and other source-based creation modes, and must be absent when creationMode is Create or omitted. A source cluster does not need to have a pool to be restored, provided an available backup exists. This immutable creation-provenance value does not change after creation. | string |
| dataEncryption | The data encryption configuration for the cluster. When omitted during initial cluster creation, the service uses SystemManaged encryption. When supplied during initial cluster creation, type is required. For PUT updates of an existing cluster, type may be omitted; if provided, it must match the existing encryption type. The encryption type is selected at cluster creation; switching between SystemManaged and AzureKeyVault after creation is not supported. | HorizonDbClusterDataEncryption |
| network | The network configuration for the cluster. When this object is omitted, the service defaults it to publicAccess Disabled. | Network |
| pointInTimeUtc | The requested point in time, in UTC. This property is required in every PointInTimeRestore request. For a same-location restore, the service restores the latest backup available at or before this value. For a cross-location restore, the service requires but ignores this value and restores the latest available backup; cross-location responses omit this property. This property must be absent for other creation modes or when creationMode is omitted and can only be specified during resource creation. | string |
| postgreSqlVersion | The PostgreSQL major version used by the HorizonDB cluster. API version 2026-10-01-preview supports versions 17 and 18. For ordinary cluster creation, the version is supplied in the request and is immutable after creation. For point-in-time restore, the service obtains the version from the source backup metadata and the request must omit this property. This API version does not support in-place PostgreSQL major-version upgrades. | '17' '18' |
HorizonDbClusterDataEncryption
| Name | Description | Value |
|---|---|---|
| primaryKeyUri | The versionless Azure Key Vault key URI used to encrypt the cluster's primary storage. Key version paths are not supported. During initial cluster creation, this property can be provided together with primaryUserAssignedIdentityId. For updates to an existing cluster through PUT or PATCH, this property and primaryUserAssignedIdentityId cannot both change in the same request; the first update must complete before submitting a separate update for the other property. | string Constraints: Pattern = ^https://[A-Za-z0-9-]+[.]vault([.]azure[.]net|[.]usgovcloudapi[.]net|[.]azure[.]cn)/keys/[A-Za-z0-9-]+/?$ |
| primaryUserAssignedIdentityId | The Azure resource ID of the user-assigned managed identity used to access the primary encryption key. The identity must also be assigned to the Cluster through its top-level identity property. During initial cluster creation, this property can be provided together with primaryKeyUri. For updates to an existing cluster through PUT or PATCH, this property and primaryKeyUri cannot both change in the same request; the first update must complete before submitting a separate update for the other property. | string |
| type | The type of data encryption used by the cluster. When the data encryption configuration is supplied during initial cluster creation, this property is required. For PUT updates of an existing cluster, this property may be omitted; if provided, it must match the existing encryption type. This value is selected at cluster creation and cannot later be changed from SystemManaged to AzureKeyVault or from AzureKeyVault to SystemManaged. | 'AzureKeyVault' 'SystemManaged' |
HorizonDbClusterManagedServiceIdentity
| Name | Description | Value |
|---|---|---|
| type | The managed identity type assigned to the cluster. Setting this property to None clears all managed identity assignments. | 'None' 'UserAssigned' (required) |
| userAssignedIdentities | The user-assigned managed identities associated with the cluster. When supplied on PUT, this dictionary replaces the complete set of assignments. When supplied on PATCH, entries are merged with the existing set and a null value removes the corresponding identity. Each dictionary key must be the full Azure resource ID of a Microsoft.ManagedIdentity/userAssignedIdentities resource. Non-null request values can be empty objects; response values contain the service-populated clientId and principalId. Assigning an identity does not grant it access to destination resources; required role assignments must be configured separately. | HorizonDbClusterManagedServiceIdentityUserAssignedIdentities |
HorizonDbClusterManagedServiceIdentityUserAssignedIdentities
| Name | Description | Value |
|---|
Network
| Name | Description | Value |
|---|---|---|
| publicAccess | Specifies whether public access is enabled for the cluster. The service defaults to Disabled when this property is omitted. | 'Disabled' 'Enabled' |
TrackedResourceTags
| Name | Description | Value |
|---|
UserAssignedIdentity
| Name | Description | Value |
|---|
ARM template resource definition
The clusters 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.
Usage Examples
ARM Template Samples
Create or replace a HorizonDB cluster.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterName": {
"type": "string",
"defaultValue": "example-cluster",
"metadata": {
"description": "The name of the HorizonDB cluster"
}
}
},
"resources": [
{
"type": "Microsoft.HorizonDb/clusters",
"apiVersion": "2026-10-01-preview",
"name": "[parameters('clusterName')]",
"location": "eastus2",
"tags": {
"environment": "production"
},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer": {}
}
},
"properties": {
"postgreSqlVersion": "17",
"network": {
"publicAccess": "Enabled"
},
"backup": {
"geoRedundancy": "Enabled",
"retentionDays": 14
}
}
}
]
}
Restore a HorizonDB cluster across Azure regions from the latest available backup.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterName": {
"type": "string",
"defaultValue": "cross-region-restored-cluster",
"metadata": {
"description": "The name of the HorizonDB cluster"
}
}
},
"resources": [
{
"type": "Microsoft.HorizonDb/clusters",
"apiVersion": "2026-10-01-preview",
"name": "[parameters('clusterName')]",
"location": "westus2",
"properties": {
"creationMode": "PointInTimeRestore",
"pointInTimeUtc": "2026-07-27T12:00:00Z",
"creationSourceClusterResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster",
"creationSourceClusterLocation": "eastus2",
"network": {
"publicAccess": "Disabled"
},
"backup": {
"geoRedundancy": "Enabled",
"retentionDays": 14
}
}
}
]
}
Create a PostgreSQL 18 HorizonDB cluster with minimum configuration and service defaults.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterName": {
"type": "string",
"defaultValue": "minimum-defaults",
"metadata": {
"description": "The name of the HorizonDB cluster"
}
}
},
"resources": [
{
"type": "Microsoft.HorizonDb/clusters",
"apiVersion": "2026-10-01-preview",
"name": "[parameters('clusterName')]",
"location": "eastus2",
"properties": {
"postgreSqlVersion": "18",
"backup": {
"geoRedundancy": "Disabled"
}
}
}
]
}
Restore a HorizonDB cluster to a point in time.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterName": {
"type": "string",
"defaultValue": "restored-cluster",
"metadata": {
"description": "The name of the HorizonDB cluster"
}
}
},
"resources": [
{
"type": "Microsoft.HorizonDb/clusters",
"apiVersion": "2026-10-01-preview",
"name": "[parameters('clusterName')]",
"location": "eastus2",
"properties": {
"creationMode": "PointInTimeRestore",
"pointInTimeUtc": "2026-07-27T12:00:00Z",
"creationSourceClusterResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster",
"network": {
"publicAccess": "Disabled"
},
"backup": {
"geoRedundancy": "Enabled",
"retentionDays": 14
}
}
}
]
}
Create a HorizonDB cluster with customer-managed key data encryption.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterName": {
"type": "string",
"defaultValue": "example-cluster",
"metadata": {
"description": "The name of the HorizonDB cluster"
}
}
},
"resources": [
{
"type": "Microsoft.HorizonDb/clusters",
"apiVersion": "2026-10-01-preview",
"name": "[parameters('clusterName')]",
"location": "eastus2",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity": {}
}
},
"properties": {
"postgreSqlVersion": "17",
"backup": {
"geoRedundancy": "Disabled",
"retentionDays": 14
},
"dataEncryption": {
"type": "AzureKeyVault",
"primaryKeyUri": "https://primary-key-vault.vault.azure.net/keys/horizondb-primary-key",
"primaryUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity"
}
}
}
]
}
Update a HorizonDB cluster.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterName": {
"type": "string",
"defaultValue": "example-cluster",
"metadata": {
"description": "The name of the HorizonDB cluster"
}
}
},
"resources": [
{
"type": "Microsoft.HorizonDb/clusters",
"apiVersion": "2026-10-01-preview",
"name": "[parameters('clusterName')]",
"tags": {
"environment": "production",
"team": "data-platform"
},
"properties": {
"network": {
"publicAccess": "Disabled"
},
"backup": {
"retentionDays": 21
}
}
}
]
}
Rotate the customer-managed key used by a HorizonDB cluster.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterName": {
"type": "string",
"defaultValue": "example-cluster",
"metadata": {
"description": "The name of the HorizonDB cluster"
}
}
},
"resources": [
{
"type": "Microsoft.HorizonDb/clusters",
"apiVersion": "2026-10-01-preview",
"name": "[parameters('clusterName')]",
"properties": {
"dataEncryption": {
"primaryKeyUri": "https://primary-key-vault.vault.azure.net/keys/horizondb-primary-key"
}
}
}
]
}
Resource format
To create a Microsoft.HorizonDb/clusters resource, add the following JSON to your template.
{
"type": "Microsoft.HorizonDb/clusters",
"apiVersion": "2026-10-01-preview",
"name": "string",
"identity": {
"type": "string",
"userAssignedIdentities": {
"{customized property}": {
}
}
},
"location": "string",
"properties": {
"aiModelManagement": "string",
"backup": {
"geoRedundancy": "string",
"retentionDays": "int"
},
"creationMode": "string",
"creationSourceClusterLocation": "string",
"creationSourceClusterResourceId": "string",
"dataEncryption": {
"primaryKeyUri": "string",
"primaryUserAssignedIdentityId": "string",
"type": "string"
},
"network": {
"publicAccess": "string"
},
"pointInTimeUtc": "string",
"postgreSqlVersion": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.HorizonDb/clusters
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2026-10-01-preview' |
| identity | The managed service identities assigned to this resource. Omitting the entire identity property from PUT or PATCH preserves all current assignments. When provided, PUT replaces the user-assigned identity set and PATCH merges it; null PATCH dictionary entries remove individual identities. Setting type to None clears all assignments. | HorizonDbClusterManagedServiceIdentity |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 1 Max length = 63 Pattern = ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$ (required) |
| properties | The resource-specific properties for this resource. | ClusterProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.HorizonDb/clusters' |
BackupProperties
| Name | Description | Value |
|---|---|---|
| geoRedundancy | The geo-redundancy state. Geo-redundant backup is not supported when dataEncryption.type is AzureKeyVault. | 'Disabled' 'Enabled' (required) |
| retentionDays | The number of days that automatic backups are retained. The service defaults to 7 days when this property is omitted. | int Constraints: Min value = 1 Max value = 35 |
ClusterProperties
| Name | Description | Value |
|---|---|---|
| aiModelManagement | Specifies whether AI Model Management is enabled for the cluster. | 'Disabled' 'Enabled' |
| backup | The backup configuration for the cluster. | BackupProperties |
| creationMode | The mode used to create the cluster. When this property is omitted while creating a new cluster, the service records Create. PointInTimeRestore creates a new cluster from an available backup; pointInTimeUtc and creationSourceClusterResourceId are then required, postgreSqlVersion must be omitted because it is obtained from the backup metadata, and creationSourceClusterLocation is required when the source and target cluster locations differ. This property is immutable and is returned as creation provenance. On replacement, omission preserves the recorded value, resubmitting the same value is accepted, and changing it is rejected. | 'Create' 'PointInTimeRestore' |
| creationSourceClusterLocation | The Azure location of the source HorizonDB cluster used for point-in-time restore. This property is optional when the source and target cluster locations are the same. It is required when the source cluster location differs from the target cluster location and must identify the source cluster's location. This property must be absent for creation modes other than PointInTimeRestore or when creationMode is omitted. This immutable creation-provenance value does not change after creation. | string |
| creationSourceClusterResourceId | The Azure resource ID of the source HorizonDB cluster used by the selected creation mode. This property is required for PointInTimeRestore and other source-based creation modes, and must be absent when creationMode is Create or omitted. A source cluster does not need to have a pool to be restored, provided an available backup exists. This immutable creation-provenance value does not change after creation. | string |
| dataEncryption | The data encryption configuration for the cluster. When omitted during initial cluster creation, the service uses SystemManaged encryption. When supplied during initial cluster creation, type is required. For PUT updates of an existing cluster, type may be omitted; if provided, it must match the existing encryption type. The encryption type is selected at cluster creation; switching between SystemManaged and AzureKeyVault after creation is not supported. | HorizonDbClusterDataEncryption |
| network | The network configuration for the cluster. When this object is omitted, the service defaults it to publicAccess Disabled. | Network |
| pointInTimeUtc | The requested point in time, in UTC. This property is required in every PointInTimeRestore request. For a same-location restore, the service restores the latest backup available at or before this value. For a cross-location restore, the service requires but ignores this value and restores the latest available backup; cross-location responses omit this property. This property must be absent for other creation modes or when creationMode is omitted and can only be specified during resource creation. | string |
| postgreSqlVersion | The PostgreSQL major version used by the HorizonDB cluster. API version 2026-10-01-preview supports versions 17 and 18. For ordinary cluster creation, the version is supplied in the request and is immutable after creation. For point-in-time restore, the service obtains the version from the source backup metadata and the request must omit this property. This API version does not support in-place PostgreSQL major-version upgrades. | '17' '18' |
HorizonDbClusterDataEncryption
| Name | Description | Value |
|---|---|---|
| primaryKeyUri | The versionless Azure Key Vault key URI used to encrypt the cluster's primary storage. Key version paths are not supported. During initial cluster creation, this property can be provided together with primaryUserAssignedIdentityId. For updates to an existing cluster through PUT or PATCH, this property and primaryUserAssignedIdentityId cannot both change in the same request; the first update must complete before submitting a separate update for the other property. | string Constraints: Pattern = ^https://[A-Za-z0-9-]+[.]vault([.]azure[.]net|[.]usgovcloudapi[.]net|[.]azure[.]cn)/keys/[A-Za-z0-9-]+/?$ |
| primaryUserAssignedIdentityId | The Azure resource ID of the user-assigned managed identity used to access the primary encryption key. The identity must also be assigned to the Cluster through its top-level identity property. During initial cluster creation, this property can be provided together with primaryKeyUri. For updates to an existing cluster through PUT or PATCH, this property and primaryKeyUri cannot both change in the same request; the first update must complete before submitting a separate update for the other property. | string |
| type | The type of data encryption used by the cluster. When the data encryption configuration is supplied during initial cluster creation, this property is required. For PUT updates of an existing cluster, this property may be omitted; if provided, it must match the existing encryption type. This value is selected at cluster creation and cannot later be changed from SystemManaged to AzureKeyVault or from AzureKeyVault to SystemManaged. | 'AzureKeyVault' 'SystemManaged' |
HorizonDbClusterManagedServiceIdentity
| Name | Description | Value |
|---|---|---|
| type | The managed identity type assigned to the cluster. Setting this property to None clears all managed identity assignments. | 'None' 'UserAssigned' (required) |
| userAssignedIdentities | The user-assigned managed identities associated with the cluster. When supplied on PUT, this dictionary replaces the complete set of assignments. When supplied on PATCH, entries are merged with the existing set and a null value removes the corresponding identity. Each dictionary key must be the full Azure resource ID of a Microsoft.ManagedIdentity/userAssignedIdentities resource. Non-null request values can be empty objects; response values contain the service-populated clientId and principalId. Assigning an identity does not grant it access to destination resources; required role assignments must be configured separately. | HorizonDbClusterManagedServiceIdentityUserAssignedIdentities |
HorizonDbClusterManagedServiceIdentityUserAssignedIdentities
| Name | Description | Value |
|---|
Network
| Name | Description | Value |
|---|---|---|
| publicAccess | Specifies whether public access is enabled for the cluster. The service defaults to Disabled when this property is omitted. | 'Disabled' 'Enabled' |
TrackedResourceTags
| Name | Description | Value |
|---|
UserAssignedIdentity
| Name | Description | Value |
|---|
Terraform (AzAPI provider) resource definition
The clusters resource type can be deployed with operations that target:
- Resource groups For a list of changed properties in each API version, see change log.
Usage Examples
Terraform Samples
Create or replace a HorizonDB cluster.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "cluster_name" {
type = string
default = "example-cluster"
description = "The name of the HorizonDB cluster"
}
data "azapi_client_config" "current" {
}
resource "azapi_resource" "clusters" {
type = "Microsoft.HorizonDb/clusters@2026-10-01-preview"
name = var.cluster_name
parent_id = "/subscriptions/${data.azapi_client_config.current.subscription_id}/resourceGroups/${data.azapi_client_config.current.resource_group_name}/providers/Microsoft.HorizonDb"
location = "eastus2"
body = {
tags = {
environment = "production"
}
identity = {
type = "UserAssigned"
userAssignedIdentities = {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer" = {
}
}
}
properties = {
postgreSqlVersion = "17"
network = {
publicAccess = "Enabled"
}
backup = {
geoRedundancy = "Enabled"
retentionDays = 14
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Restore a HorizonDB cluster across Azure regions from the latest available backup.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "cluster_name" {
type = string
default = "cross-region-restored-cluster"
description = "The name of the HorizonDB cluster"
}
data "azapi_client_config" "current" {
}
resource "azapi_resource" "clusters" {
type = "Microsoft.HorizonDb/clusters@2026-10-01-preview"
name = var.cluster_name
parent_id = "/subscriptions/${data.azapi_client_config.current.subscription_id}/resourceGroups/${data.azapi_client_config.current.resource_group_name}/providers/Microsoft.HorizonDb"
location = "westus2"
body = {
properties = {
creationMode = "PointInTimeRestore"
pointInTimeUtc = "2026-07-27T12:00:00Z"
creationSourceClusterResourceId = "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster"
creationSourceClusterLocation = "eastus2"
network = {
publicAccess = "Disabled"
}
backup = {
geoRedundancy = "Enabled"
retentionDays = 14
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Create a PostgreSQL 18 HorizonDB cluster with minimum configuration and service defaults.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "cluster_name" {
type = string
default = "minimum-defaults"
description = "The name of the HorizonDB cluster"
}
data "azapi_client_config" "current" {
}
resource "azapi_resource" "clusters" {
type = "Microsoft.HorizonDb/clusters@2026-10-01-preview"
name = var.cluster_name
parent_id = "/subscriptions/${data.azapi_client_config.current.subscription_id}/resourceGroups/${data.azapi_client_config.current.resource_group_name}/providers/Microsoft.HorizonDb"
location = "eastus2"
body = {
properties = {
postgreSqlVersion = "18"
backup = {
geoRedundancy = "Disabled"
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Restore a HorizonDB cluster to a point in time.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "cluster_name" {
type = string
default = "restored-cluster"
description = "The name of the HorizonDB cluster"
}
data "azapi_client_config" "current" {
}
resource "azapi_resource" "clusters" {
type = "Microsoft.HorizonDb/clusters@2026-10-01-preview"
name = var.cluster_name
parent_id = "/subscriptions/${data.azapi_client_config.current.subscription_id}/resourceGroups/${data.azapi_client_config.current.resource_group_name}/providers/Microsoft.HorizonDb"
location = "eastus2"
body = {
properties = {
creationMode = "PointInTimeRestore"
pointInTimeUtc = "2026-07-27T12:00:00Z"
creationSourceClusterResourceId = "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster"
network = {
publicAccess = "Disabled"
}
backup = {
geoRedundancy = "Enabled"
retentionDays = 14
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Create a HorizonDB cluster with customer-managed key data encryption.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "cluster_name" {
type = string
default = "example-cluster"
description = "The name of the HorizonDB cluster"
}
data "azapi_client_config" "current" {
}
resource "azapi_resource" "clusters" {
type = "Microsoft.HorizonDb/clusters@2026-10-01-preview"
name = var.cluster_name
parent_id = "/subscriptions/${data.azapi_client_config.current.subscription_id}/resourceGroups/${data.azapi_client_config.current.resource_group_name}/providers/Microsoft.HorizonDb"
location = "eastus2"
body = {
identity = {
type = "UserAssigned"
userAssignedIdentities = {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity" = {
}
}
}
properties = {
postgreSqlVersion = "17"
backup = {
geoRedundancy = "Disabled"
retentionDays = 14
}
dataEncryption = {
type = "AzureKeyVault"
primaryKeyUri = "https://primary-key-vault.vault.azure.net/keys/horizondb-primary-key"
primaryUserAssignedIdentityId = "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity"
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Update a HorizonDB cluster.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "cluster_name" {
type = string
default = "example-cluster"
description = "The name of the HorizonDB cluster"
}
data "azapi_client_config" "current" {
}
resource "azapi_update_resource" "clusters" {
type = "Microsoft.HorizonDb/clusters@2026-10-01-preview"
name = var.cluster_name
parent_id = "/subscriptions/${data.azapi_client_config.current.subscription_id}/resourceGroups/${data.azapi_client_config.current.resource_group_name}/providers/Microsoft.HorizonDb"
body = {
tags = {
environment = "production"
team = "data-platform"
}
properties = {
network = {
publicAccess = "Disabled"
}
backup = {
retentionDays = 21
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Rotate the customer-managed key used by a HorizonDB cluster.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "cluster_name" {
type = string
default = "example-cluster"
description = "The name of the HorizonDB cluster"
}
data "azapi_client_config" "current" {
}
resource "azapi_resource" "clusters" {
type = "Microsoft.HorizonDb/clusters@2026-10-01-preview"
name = var.cluster_name
parent_id = "/subscriptions/${data.azapi_client_config.current.subscription_id}/resourceGroups/${data.azapi_client_config.current.resource_group_name}/providers/Microsoft.HorizonDb"
body = {
properties = {
dataEncryption = {
primaryKeyUri = "https://primary-key-vault.vault.azure.net/keys/horizondb-primary-key"
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Resource format
To create a Microsoft.HorizonDb/clusters resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.HorizonDb/clusters@2026-10-01-preview"
name = "string"
parent_id = "string"
identity {
type = "string"
identity_ids = [
"string"
]
}
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
aiModelManagement = "string"
backup = {
geoRedundancy = "string"
retentionDays = int
}
creationMode = "string"
creationSourceClusterLocation = "string"
creationSourceClusterResourceId = "string"
dataEncryption = {
primaryKeyUri = "string"
primaryUserAssignedIdentityId = "string"
type = "string"
}
network = {
publicAccess = "string"
}
pointInTimeUtc = "string"
postgreSqlVersion = "string"
}
}
}
Property Values
Microsoft.HorizonDb/clusters
| Name | Description | Value |
|---|---|---|
| identity | The managed service identities assigned to this resource. Omitting the entire identity property from PUT or PATCH preserves all current assignments. When provided, PUT replaces the user-assigned identity set and PATCH merges it; null PATCH dictionary entries remove individual identities. Setting type to None clears all assignments. | HorizonDbClusterManagedServiceIdentity |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 1 Max length = 63 Pattern = ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$ (required) |
| properties | The resource-specific properties for this resource. | ClusterProperties |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.HorizonDb/clusters@2026-10-01-preview" |
BackupProperties
| Name | Description | Value |
|---|---|---|
| geoRedundancy | The geo-redundancy state. Geo-redundant backup is not supported when dataEncryption.type is AzureKeyVault. | 'Disabled' 'Enabled' (required) |
| retentionDays | The number of days that automatic backups are retained. The service defaults to 7 days when this property is omitted. | int Constraints: Min value = 1 Max value = 35 |
ClusterProperties
| Name | Description | Value |
|---|---|---|
| aiModelManagement | Specifies whether AI Model Management is enabled for the cluster. | 'Disabled' 'Enabled' |
| backup | The backup configuration for the cluster. | BackupProperties |
| creationMode | The mode used to create the cluster. When this property is omitted while creating a new cluster, the service records Create. PointInTimeRestore creates a new cluster from an available backup; pointInTimeUtc and creationSourceClusterResourceId are then required, postgreSqlVersion must be omitted because it is obtained from the backup metadata, and creationSourceClusterLocation is required when the source and target cluster locations differ. This property is immutable and is returned as creation provenance. On replacement, omission preserves the recorded value, resubmitting the same value is accepted, and changing it is rejected. | 'Create' 'PointInTimeRestore' |
| creationSourceClusterLocation | The Azure location of the source HorizonDB cluster used for point-in-time restore. This property is optional when the source and target cluster locations are the same. It is required when the source cluster location differs from the target cluster location and must identify the source cluster's location. This property must be absent for creation modes other than PointInTimeRestore or when creationMode is omitted. This immutable creation-provenance value does not change after creation. | string |
| creationSourceClusterResourceId | The Azure resource ID of the source HorizonDB cluster used by the selected creation mode. This property is required for PointInTimeRestore and other source-based creation modes, and must be absent when creationMode is Create or omitted. A source cluster does not need to have a pool to be restored, provided an available backup exists. This immutable creation-provenance value does not change after creation. | string |
| dataEncryption | The data encryption configuration for the cluster. When omitted during initial cluster creation, the service uses SystemManaged encryption. When supplied during initial cluster creation, type is required. For PUT updates of an existing cluster, type may be omitted; if provided, it must match the existing encryption type. The encryption type is selected at cluster creation; switching between SystemManaged and AzureKeyVault after creation is not supported. | HorizonDbClusterDataEncryption |
| network | The network configuration for the cluster. When this object is omitted, the service defaults it to publicAccess Disabled. | Network |
| pointInTimeUtc | The requested point in time, in UTC. This property is required in every PointInTimeRestore request. For a same-location restore, the service restores the latest backup available at or before this value. For a cross-location restore, the service requires but ignores this value and restores the latest available backup; cross-location responses omit this property. This property must be absent for other creation modes or when creationMode is omitted and can only be specified during resource creation. | string |
| postgreSqlVersion | The PostgreSQL major version used by the HorizonDB cluster. API version 2026-10-01-preview supports versions 17 and 18. For ordinary cluster creation, the version is supplied in the request and is immutable after creation. For point-in-time restore, the service obtains the version from the source backup metadata and the request must omit this property. This API version does not support in-place PostgreSQL major-version upgrades. | '17' '18' |
HorizonDbClusterDataEncryption
| Name | Description | Value |
|---|---|---|
| primaryKeyUri | The versionless Azure Key Vault key URI used to encrypt the cluster's primary storage. Key version paths are not supported. During initial cluster creation, this property can be provided together with primaryUserAssignedIdentityId. For updates to an existing cluster through PUT or PATCH, this property and primaryUserAssignedIdentityId cannot both change in the same request; the first update must complete before submitting a separate update for the other property. | string Constraints: Pattern = ^https://[A-Za-z0-9-]+[.]vault([.]azure[.]net|[.]usgovcloudapi[.]net|[.]azure[.]cn)/keys/[A-Za-z0-9-]+/?$ |
| primaryUserAssignedIdentityId | The Azure resource ID of the user-assigned managed identity used to access the primary encryption key. The identity must also be assigned to the Cluster through its top-level identity property. During initial cluster creation, this property can be provided together with primaryKeyUri. For updates to an existing cluster through PUT or PATCH, this property and primaryKeyUri cannot both change in the same request; the first update must complete before submitting a separate update for the other property. | string |
| type | The type of data encryption used by the cluster. When the data encryption configuration is supplied during initial cluster creation, this property is required. For PUT updates of an existing cluster, this property may be omitted; if provided, it must match the existing encryption type. This value is selected at cluster creation and cannot later be changed from SystemManaged to AzureKeyVault or from AzureKeyVault to SystemManaged. | 'AzureKeyVault' 'SystemManaged' |
HorizonDbClusterManagedServiceIdentity
| Name | Description | Value |
|---|---|---|
| type | The managed identity type assigned to the cluster. Setting this property to None clears all managed identity assignments. | 'None' 'UserAssigned' (required) |
| userAssignedIdentities | The user-assigned managed identities associated with the cluster. When supplied on PUT, this dictionary replaces the complete set of assignments. When supplied on PATCH, entries are merged with the existing set and a null value removes the corresponding identity. Each dictionary key must be the full Azure resource ID of a Microsoft.ManagedIdentity/userAssignedIdentities resource. Non-null request values can be empty objects; response values contain the service-populated clientId and principalId. Assigning an identity does not grant it access to destination resources; required role assignments must be configured separately. | HorizonDbClusterManagedServiceIdentityUserAssignedIdentities |
HorizonDbClusterManagedServiceIdentityUserAssignedIdentities
| Name | Description | Value |
|---|
Network
| Name | Description | Value |
|---|---|---|
| publicAccess | Specifies whether public access is enabled for the cluster. The service defaults to Disabled when this property is omitted. | 'Disabled' 'Enabled' |
TrackedResourceTags
| Name | Description | Value |
|---|
UserAssignedIdentity
| Name | Description | Value |
|---|