Azure Cosmos DB serverless went GA last week, but the documentation has not caught up yet, if you are looking to provision an Azure Cosmos DB serverless account using Bicep you can use the following snippet, the magic here is the capabilities section.
resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2021-04-15' = {
name: cosmosName
location: location
kind: 'GlobalDocumentDB'
properties: {
//enableFreeTier: true
consistencyPolicy: {
defaultConsistencyLevel: 'Session'
}
locations: [
{
locationName: location
failoverPriority: 0
isZoneRedundant: false
}
]
capabilities: [
{
name: 'EnableServerless'
}
]
databaseAccountOfferType: 'Standard'
}
}