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/migrations 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/migrations resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.DBforPostgreSQL/flexibleServers/migrations@2026-01-01-preview' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
cancel: 'string'
dbsToCancelMigrationOn: [
'string'
]
dbsToMigrate: [
'string'
]
dbsToTriggerCutoverOn: [
'string'
]
migrateRoles: 'string'
migrationInstanceResourceId: 'string'
migrationMode: 'string'
migrationOption: 'string'
migrationWindowEndTimeInUtc: 'string'
migrationWindowStartTimeInUtc: 'string'
overwriteDbsInTarget: 'string'
secretParameters: {
adminCredentials: {
sourceServerPassword: 'string'
targetServerPassword: 'string'
}
sourceServerUsername: 'string'
targetServerUsername: 'string'
}
setupLogicalReplicationOnSourceDbIfNeeded: 'string'
sourceDbServerFullyQualifiedDomainName: 'string'
sourceDbServerResourceId: 'string'
sourceType: 'string'
sslMode: 'string'
startDataMigration: 'string'
targetDbServerFullyQualifiedDomainName: 'string'
triggerCutover: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.DBforPostgreSQL/flexibleServers/migrations
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Pattern = ^[a-z][a-z0-9]*$ (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 | Migration properties. | MigrationProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
AdminCredentials
| Name | Description | Value |
|---|---|---|
| sourceServerPassword | Password for the user of the source server. | string Constraints: Sensitive value. Pass in as a secure parameter. (required) |
| targetServerPassword | Password for the user of the target server. | string Constraints: Sensitive value. Pass in as a secure parameter. (required) |
MigrationProperties
| Name | Description | Value |
|---|---|---|
| cancel | Indicates if cancel must be triggered for the entire migration. | 'False' 'True' |
| dbsToCancelMigrationOn | When you want to trigger cancel for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array. | string[] |
| dbsToMigrate | Names of databases to migrate. | string[] |
| dbsToTriggerCutoverOn | When you want to trigger cutover for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array. | string[] |
| migrateRoles | Indicates if roles and permissions must be migrated. | 'False' 'True' |
| migrationInstanceResourceId | Identifier of the private endpoint migration instance. | string |
| migrationMode | Mode used to perform the migration: Online or Offline. | 'Offline' 'Online' |
| migrationOption | Supported option for a migration. | 'Migrate' 'Validate' 'ValidateAndMigrate' |
| migrationWindowEndTimeInUtc | End time (UTC) for migration window. | string |
| migrationWindowStartTimeInUtc | Start time (UTC) for migration window. | string |
| overwriteDbsInTarget | Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the migration workflow detects that the database already exists on the target server, it will wait for a confirmation. | 'False' 'True' |
| secretParameters | Migration secret parameters. | MigrationSecretParameters |
| setupLogicalReplicationOnSourceDbIfNeeded | Indicates whether to setup logical replication on source server, if needed. | 'False' 'True' |
| sourceDbServerFullyQualifiedDomainName | Fully qualified domain name (FQDN) or IP address of the source server. This property is optional. When provided, the migration service will always use it to connect to the source server. | string |
| sourceDbServerResourceId | Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or hostname:port@username. | string |
| sourceType | Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL | 'ApsaraDB_RDS' 'AWS' 'AWS_AURORA' 'AWS_EC2' 'AWS_RDS' 'AzureVM' 'Crunchy_PostgreSQL' 'Digital_Ocean_Droplets' 'Digital_Ocean_PostgreSQL' 'EDB' 'EDB_Oracle_Server' 'EDB_PostgreSQL' 'GCP' 'GCP_AlloyDB' 'GCP_CloudSQL' 'GCP_Compute' 'Heroku_PostgreSQL' 'Huawei_Compute' 'Huawei_RDS' 'OnPremises' 'PostgreSQLCosmosDB' 'PostgreSQLFlexibleServer' 'PostgreSQLSingleServer' 'Supabase_PostgreSQL' |
| sslMode | SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. | 'Prefer' 'Require' 'VerifyCA' 'VerifyFull' |
| startDataMigration | Indicates if data migration must start right away. | 'False' 'True' |
| targetDbServerFullyQualifiedDomainName | Fully qualified domain name (FQDN) or IP address of the target server. This property is optional. When provided, the migration service will always use it to connect to the target server. | string |
| triggerCutover | Indicates if cutover must be triggered for the entire migration. | 'False' 'True' |
MigrationSecretParameters
| Name | Description | Value |
|---|---|---|
| adminCredentials | Credentials of administrator users for source and target servers. | AdminCredentials (required) |
| sourceServerUsername | Gets or sets the name of the user for the source server. This user doesn't need to be an administrator. | string |
| targetServerUsername | Gets or sets the name of the user for the target server. This user doesn't need to be an administrator. | string |
TrackedResourceTags
| Name | Description | Value |
|---|
ARM template resource definition
The flexibleServers/migrations 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/migrations resource, add the following JSON to your template.
{
"type": "Microsoft.DBforPostgreSQL/flexibleServers/migrations",
"apiVersion": "2026-01-01-preview",
"name": "string",
"location": "string",
"properties": {
"cancel": "string",
"dbsToCancelMigrationOn": [ "string" ],
"dbsToMigrate": [ "string" ],
"dbsToTriggerCutoverOn": [ "string" ],
"migrateRoles": "string",
"migrationInstanceResourceId": "string",
"migrationMode": "string",
"migrationOption": "string",
"migrationWindowEndTimeInUtc": "string",
"migrationWindowStartTimeInUtc": "string",
"overwriteDbsInTarget": "string",
"secretParameters": {
"adminCredentials": {
"sourceServerPassword": "string",
"targetServerPassword": "string"
},
"sourceServerUsername": "string",
"targetServerUsername": "string"
},
"setupLogicalReplicationOnSourceDbIfNeeded": "string",
"sourceDbServerFullyQualifiedDomainName": "string",
"sourceDbServerResourceId": "string",
"sourceType": "string",
"sslMode": "string",
"startDataMigration": "string",
"targetDbServerFullyQualifiedDomainName": "string",
"triggerCutover": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.DBforPostgreSQL/flexibleServers/migrations
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2026-01-01-preview' |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Pattern = ^[a-z][a-z0-9]*$ (required) |
| properties | Migration properties. | MigrationProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.DBforPostgreSQL/flexibleServers/migrations' |
AdminCredentials
| Name | Description | Value |
|---|---|---|
| sourceServerPassword | Password for the user of the source server. | string Constraints: Sensitive value. Pass in as a secure parameter. (required) |
| targetServerPassword | Password for the user of the target server. | string Constraints: Sensitive value. Pass in as a secure parameter. (required) |
MigrationProperties
| Name | Description | Value |
|---|---|---|
| cancel | Indicates if cancel must be triggered for the entire migration. | 'False' 'True' |
| dbsToCancelMigrationOn | When you want to trigger cancel for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array. | string[] |
| dbsToMigrate | Names of databases to migrate. | string[] |
| dbsToTriggerCutoverOn | When you want to trigger cutover for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array. | string[] |
| migrateRoles | Indicates if roles and permissions must be migrated. | 'False' 'True' |
| migrationInstanceResourceId | Identifier of the private endpoint migration instance. | string |
| migrationMode | Mode used to perform the migration: Online or Offline. | 'Offline' 'Online' |
| migrationOption | Supported option for a migration. | 'Migrate' 'Validate' 'ValidateAndMigrate' |
| migrationWindowEndTimeInUtc | End time (UTC) for migration window. | string |
| migrationWindowStartTimeInUtc | Start time (UTC) for migration window. | string |
| overwriteDbsInTarget | Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the migration workflow detects that the database already exists on the target server, it will wait for a confirmation. | 'False' 'True' |
| secretParameters | Migration secret parameters. | MigrationSecretParameters |
| setupLogicalReplicationOnSourceDbIfNeeded | Indicates whether to setup logical replication on source server, if needed. | 'False' 'True' |
| sourceDbServerFullyQualifiedDomainName | Fully qualified domain name (FQDN) or IP address of the source server. This property is optional. When provided, the migration service will always use it to connect to the source server. | string |
| sourceDbServerResourceId | Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or hostname:port@username. | string |
| sourceType | Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL | 'ApsaraDB_RDS' 'AWS' 'AWS_AURORA' 'AWS_EC2' 'AWS_RDS' 'AzureVM' 'Crunchy_PostgreSQL' 'Digital_Ocean_Droplets' 'Digital_Ocean_PostgreSQL' 'EDB' 'EDB_Oracle_Server' 'EDB_PostgreSQL' 'GCP' 'GCP_AlloyDB' 'GCP_CloudSQL' 'GCP_Compute' 'Heroku_PostgreSQL' 'Huawei_Compute' 'Huawei_RDS' 'OnPremises' 'PostgreSQLCosmosDB' 'PostgreSQLFlexibleServer' 'PostgreSQLSingleServer' 'Supabase_PostgreSQL' |
| sslMode | SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. | 'Prefer' 'Require' 'VerifyCA' 'VerifyFull' |
| startDataMigration | Indicates if data migration must start right away. | 'False' 'True' |
| targetDbServerFullyQualifiedDomainName | Fully qualified domain name (FQDN) or IP address of the target server. This property is optional. When provided, the migration service will always use it to connect to the target server. | string |
| triggerCutover | Indicates if cutover must be triggered for the entire migration. | 'False' 'True' |
MigrationSecretParameters
| Name | Description | Value |
|---|---|---|
| adminCredentials | Credentials of administrator users for source and target servers. | AdminCredentials (required) |
| sourceServerUsername | Gets or sets the name of the user for the source server. This user doesn't need to be an administrator. | string |
| targetServerUsername | Gets or sets the name of the user for the target server. This user doesn't need to be an administrator. | string |
TrackedResourceTags
| Name | Description | Value |
|---|
Usage Examples
Terraform (AzAPI provider) resource definition
The flexibleServers/migrations 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/migrations resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DBforPostgreSQL/flexibleServers/migrations@2026-01-01-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
cancel = "string"
dbsToCancelMigrationOn = [
"string"
]
dbsToMigrate = [
"string"
]
dbsToTriggerCutoverOn = [
"string"
]
migrateRoles = "string"
migrationInstanceResourceId = "string"
migrationMode = "string"
migrationOption = "string"
migrationWindowEndTimeInUtc = "string"
migrationWindowStartTimeInUtc = "string"
overwriteDbsInTarget = "string"
secretParameters = {
adminCredentials = {
sourceServerPassword = "string"
targetServerPassword = "string"
}
sourceServerUsername = "string"
targetServerUsername = "string"
}
setupLogicalReplicationOnSourceDbIfNeeded = "string"
sourceDbServerFullyQualifiedDomainName = "string"
sourceDbServerResourceId = "string"
sourceType = "string"
sslMode = "string"
startDataMigration = "string"
targetDbServerFullyQualifiedDomainName = "string"
triggerCutover = "string"
}
}
}
Property Values
Microsoft.DBforPostgreSQL/flexibleServers/migrations
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Pattern = ^[a-z][a-z0-9]*$ (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: flexibleServers |
| properties | Migration properties. | MigrationProperties |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.DBforPostgreSQL/flexibleServers/migrations@2026-01-01-preview" |
AdminCredentials
| Name | Description | Value |
|---|---|---|
| sourceServerPassword | Password for the user of the source server. | string Constraints: Sensitive value. Pass in as a secure parameter. (required) |
| targetServerPassword | Password for the user of the target server. | string Constraints: Sensitive value. Pass in as a secure parameter. (required) |
MigrationProperties
| Name | Description | Value |
|---|---|---|
| cancel | Indicates if cancel must be triggered for the entire migration. | 'False' 'True' |
| dbsToCancelMigrationOn | When you want to trigger cancel for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array. | string[] |
| dbsToMigrate | Names of databases to migrate. | string[] |
| dbsToTriggerCutoverOn | When you want to trigger cutover for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array. | string[] |
| migrateRoles | Indicates if roles and permissions must be migrated. | 'False' 'True' |
| migrationInstanceResourceId | Identifier of the private endpoint migration instance. | string |
| migrationMode | Mode used to perform the migration: Online or Offline. | 'Offline' 'Online' |
| migrationOption | Supported option for a migration. | 'Migrate' 'Validate' 'ValidateAndMigrate' |
| migrationWindowEndTimeInUtc | End time (UTC) for migration window. | string |
| migrationWindowStartTimeInUtc | Start time (UTC) for migration window. | string |
| overwriteDbsInTarget | Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the migration workflow detects that the database already exists on the target server, it will wait for a confirmation. | 'False' 'True' |
| secretParameters | Migration secret parameters. | MigrationSecretParameters |
| setupLogicalReplicationOnSourceDbIfNeeded | Indicates whether to setup logical replication on source server, if needed. | 'False' 'True' |
| sourceDbServerFullyQualifiedDomainName | Fully qualified domain name (FQDN) or IP address of the source server. This property is optional. When provided, the migration service will always use it to connect to the source server. | string |
| sourceDbServerResourceId | Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or hostname:port@username. | string |
| sourceType | Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL | 'ApsaraDB_RDS' 'AWS' 'AWS_AURORA' 'AWS_EC2' 'AWS_RDS' 'AzureVM' 'Crunchy_PostgreSQL' 'Digital_Ocean_Droplets' 'Digital_Ocean_PostgreSQL' 'EDB' 'EDB_Oracle_Server' 'EDB_PostgreSQL' 'GCP' 'GCP_AlloyDB' 'GCP_CloudSQL' 'GCP_Compute' 'Heroku_PostgreSQL' 'Huawei_Compute' 'Huawei_RDS' 'OnPremises' 'PostgreSQLCosmosDB' 'PostgreSQLFlexibleServer' 'PostgreSQLSingleServer' 'Supabase_PostgreSQL' |
| sslMode | SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. | 'Prefer' 'Require' 'VerifyCA' 'VerifyFull' |
| startDataMigration | Indicates if data migration must start right away. | 'False' 'True' |
| targetDbServerFullyQualifiedDomainName | Fully qualified domain name (FQDN) or IP address of the target server. This property is optional. When provided, the migration service will always use it to connect to the target server. | string |
| triggerCutover | Indicates if cutover must be triggered for the entire migration. | 'False' 'True' |
MigrationSecretParameters
| Name | Description | Value |
|---|---|---|
| adminCredentials | Credentials of administrator users for source and target servers. | AdminCredentials (required) |
| sourceServerUsername | Gets or sets the name of the user for the source server. This user doesn't need to be an administrator. | string |
| targetServerUsername | Gets or sets the name of the user for the target server. This user doesn't need to be an administrator. | string |
TrackedResourceTags
| Name | Description | Value |
|---|