简体   繁体   English

Bicep 模板 Azure SQL 无服务器数据库

[英]Bicep template for Azure SQL Serverless database

Is Azure SQL Serverless database implementation supported using Bicep? Azure SQL 是否支持使用 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.我还没有在 Web 上看到它的任何 Bicep 示例。大多数示例仅使用 ARM,将 ARM 逆向工程到 Bicep 对我不起作用。 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
    
  }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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