简体   繁体   中英

Bicep template for Azure SQL Serverless database

Is Azure SQL Serverless database implementation supported using Bicep? I haven't seen any Bicep examples of it on Web. Most of the examples are using ARM only and the reverse engineering of ARM to Bicep is not working for me. It is just giving internal server error with no more details. Does someone have any working example of it which can be used as a reference? Appreciate your help in advance!

Here is bicep file for reference.

param servername string = 'mysqlserver-1036050389'
param location string = 'centralus'

resource servername_resource 'Microsoft.Sql/servers@2022-05-01-preview' = {
  name: servername
  location: location
  properties: {
    administratorLogin: 'azureuser'
    administratorLoginPassword: 'Bigambs123457'
    version: '12.0'
    publicNetworkAccess: 'Enabled'
    restrictOutboundNetworkAccess: 'Disabled'
  }
}

resource servername_mySampleDatabase 'Microsoft.Sql/servers/databases@2022-05-01-preview' = {
  parent: servername_resource
  name: 'mySampleDatabase'
  location: location
  sku: {
    name: 'GP_S_Gen5'
    tier: 'GeneralPurpose'
    family: 'Gen5'
    capacity: 2
  }
  kind: 'v12.0,user,vcore,serverless'
  properties: {
    collation: 'SQL_Latin1_General_CP1_CI_AS'
    maxSizeBytes: 34359738368
    catalogCollation: 'SQL_Latin1_General_CP1_CI_AS'
    zoneRedundant: false
    readScale: 'Disabled'
    autoPauseDelay: 60
    requestedBackupStorageRedundancy: 'Geo'
    minCapacity: 2
    isLedgerOn: false
    
  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM