Quickstart: Create a server - Bicep
This quickstart describes how to create an Analysis Services server resource in your Azure subscription by using Bicep.
Bicep is a domain-specific language (DSL) that uses declarative syntax to deploy Azure resources. It provides concise syntax, reliable type safety, and support for code reuse. Bicep offers the best authoring experience for your infrastructure-as-code solutions in Azure.
Prerequisites
- Azure subscription: Visit Azure Free Trial to create an account.
- Microsoft Entra ID: Your subscription must be associated with a Microsoft Entra tenant. And, you need to be signed in to Azure with an account in that Microsoft Entra ID. To learn more, see Authentication and user permissions.
Review the Bicep file
The Bicep file used in this quickstart is from Azure quickstart templates.
@description('The name of the Azure Analysis Services server to create. Server name must begin with a letter, be lowercase alphanumeric, and between 3 and 63 characters in length. Server name must be unique per region.')
param serverName string
@description('Location of the Azure Analysis Services server. For supported regions, see https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-overview#availability-by-region')
param location string = resourceGroup().location
@description('The sku name of the Azure Analysis Services server to create. Choose from: B1, B2, D1, S0, S1, S2, S3, S4, S8, S9. Some skus are region specific. See https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-overview#availability-by-region')
param skuName string = 'S0'
@description('The total number of query replica scale-out instances. Scale-out of more than one instance is supported on selected regions only. See https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-overview#availability-by-region')
param capacity int = 1
@description('The inbound firewall rules to define on the server. If not specified, firewall is disabled.')
param firewallSettings object = {
firewallRules: [
{
firewallRuleName: 'AllowFromAll'
rangeStart: '0.0.0.0'
rangeEnd: '255.255.255.255'
}
]
enablePowerBIService: true
}
@description('The SAS URI to a private Azure Blob Storage container with read, write and list permissions. Required only if you intend to use the backup/restore functionality. See https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-backup')
param backupBlobContainerUri string = ''
resource server 'Microsoft.AnalysisServices/servers@2017-08-01' = {
name: serverName
location: location
sku: {
name: skuName
capacity: capacity
}
properties: {
ipV4FirewallSettings: firewallSettings
backupBlobContainerUri: backupBlobContainerUri
}
}
A single Microsoft.AnalysisServices/servers resource with a firewall rule is defined in the Bicep file.
Deploy the Bicep file
Save the Bicep file as main.bicep to your local computer.
Deploy the Bicep file using either Azure CLI or Azure PowerShell.
az group create --name exampleRG --location eastus az deployment group create --resource-group exampleRG --template-file main.bicep --parameters serverName=<analysis-service-name>
Note
Replace <analysis-service-name> with a unique analysis service name.
When the deployment finishes, you should see a message indicating the deployment succeeded.
Validate the deployment
Use the Azure portal or Azure PowerShell to verify the resource group and server resource was created.
Get-AzAnalysisServicesServer -Name <analysis-service-name>
Clean up resources
When no longer needed, use the Azure portal, Azure CLI, or Azure PowerShell to delete the resource group and the server resource.
az group delete --name exampleRG
Next steps
In this quickstart, you used a Bicep file to create a new resource group and an Azure Analysis Services server resource. After you've created a server resource by using the template, consider the following: