Description
First we get backup retention days for postgresql flexible server:
Get https://management.azure.com/subscriptions/.../resourceGroups/testPostgreSql/providers/Microsoft.DBforPostgreSQL/flexibleServers/acctest-fs-0302?api-version=2022-12-01
Response Body:
{
"sku": {
"name": "Standard_D2s_v3",
"tier": "GeneralPurpose"
},
"systemData": {
"createdAt": "2023-03-02T02:13:39.8238554Z"
},
"properties": {
"authConfig": {
"activeDirectoryAuth": "Disabled",
"passwordAuth": "Enabled"
},
"dataEncryption": {
"type": "SystemManaged"
},
"fullyQualifiedDomainName": "acctest-fs-0302.postgres.database.azure.com",
"version": "13",
"minorVersion": "9",
"administratorLogin": "adminTerraform",
"state": "Ready",
"availabilityZone": "1",
"storage": {
"storageSizeGB": 32
},
"backup": {
"backupRetentionDays": 7,
"geoRedundantBackup": "Disabled",
"earliestRestoreDate": "2023-03-02T02:19:18.3300808+00:00"
},
"network": {
"publicNetworkAccess": "Disabled",
"delegatedSubnetResourceId": "/subscriptions/.../resourceGroups/testPostgreSql//providers/Microsoft.Network/virtualNetworks/acctest-vn-0302/subnets/acctest-sn-0302",
"privateDnsZoneArmResourceId": "/subscriptions/.../resourceGroups/testPostgreSql//providers/Microsoft.Network/privateDnsZones/acc0302.postgres.database.azure.com"
},
"highAvailability": {
"mode": "ZoneRedundant",
"state": "Healthy",
"standbyAvailabilityZone": "2"
},
"maintenanceWindow": {
"customWindow": "Enabled",
"dayOfWeek": 0,
"startHour": 8,
"startMinute": 0
},
"replicationRole": "Primary",
"replicaCapacity": 5
},
"location": "East US",
"tags": {
"ENV": "Stage"
},
"id": "/subscriptions/.../resourceGroups/testPostgreSql//providers/Microsoft.DBforPostgreSQL/flexibleServers/acctest-fs-0302",
"name": "acctest-fs-0302",
"type": "Microsoft.DBforPostgreSQL/flexibleServers"
}
Then we update the backupRetentionDays
and tags
, everything works fine.
Patch https://management.azure.com/subscriptions/.../resourceGroups/testPostgreSql/providers/Microsoft.DBforPostgreSQL/flexibleServers/acctest-fs-0302?api-version=2022-12-01
Request Body:
{
"properties":{
"backup": {
"backupRetentionDays": 12
}
},
"tags":{
"ENV":"Stage01"
}
}
But when we update the backupRetentionDays
, tags
and storageSizeGB
together, only backupRetentionDays
and tags
update successfully, the backupRetentionDays
does not.
Request Body:
{
"properties":{
"storage": {
"storageSizeGB": 64
},
"backup": {
"backupRetentionDays": 11
}
},
"tags":{
"ENV":"Stage02"
}
}
I assume that this is an API bug, correct? If not, is it possible to provide public document for this change, since it was working fine not too long ago(January 2023).