1

I would like to create PostgreSQL for location based service needs. I would install GIS extensions next.

I have created manually Azure Database for PostgreSQL flexible server to decide correct config. "sku": {"name": "Standard_B1ms","tier": "Burstable"} I wanted to create Single server, but it was not available in Europe for some reason. I thought that missing Burstable is good for initial POC, but general purpose is good as well.

Now trying to create PostgreSQL with Bicep. However I have difficulty to set valid server. Firstly Burstable was not available. Next I cannot set valid sku name.

az deployment group create:

{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource 
deployment operation failed. Please list deployment operations for details. Please see 
https://aka.ms/DeployOperations for usage details.","details": 
[{"code":"BadRequest","message":"{\r\n  \"error\": {\r\n    \"code\": 
\"InvalidEditionSloCombination\",\r\n    \"message\": \"The edition 
GeneralPurpose does not support the service objective Standard_D2s_v3\"\r\n  }\r\n}"}]}}

main.bicep:

resource symbolicname 'Microsoft.DBforPostgreSQL/servers@2017-12-01' = {
  name: 'my-postgresql-dev'
  location: 'West Europe'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  sku: {
    name: 'Standard_D2s_v3' 
    tier: 'GeneralPurpose'
  }
  identity: {
    type: 'SystemAssigned'
  }
  properties: {
    administratorLogin: 'sqladmin'
    administratorLoginPassword: 'asfar43efw!sdf'
    storageProfile: {
      backupRetentionDays: 7
      geoRedundantBackup: 'Disabled'
      storageMB: 32000
    }
    version: '11'
    createMode: 'Default'
    // For remaining properties, see ServerPropertiesForCreate objects
  }
}
1
  • Did that work for you ? Commented Apr 19, 2022 at 8:54

1 Answer 1

1

The error you received is related to the sku name:

The edition GeneralPurpose does not support the service objective Standard_D2s_v3

Looking at the documentation, the sku name has a specific naming convention:

The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.

In you case, for general purpose it will be GP_GEN5_{number of cores}.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.