Skip to content

[DBforPostgreSQL] Updating backup retention days for PostgreSQL flexible server failed #22867

Open
@sinbai

Description

@sinbai

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.

Patch https://management.azure.com/subscriptions/.../resourceGroups/testPostgreSql/providers/Microsoft.DBforPostgreSQL/flexibleServers/acctest-fs-0302?api-version=2022-12-01

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    DBforPostgreSQLPostgreSQLService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions