Microsoft.Sql servers/firewallRules 2014-04-01

Bicep resource definition

The servers/firewallRules resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Sql/servers/firewallRules resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Sql/servers/firewallRules@2014-04-01' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    endIpAddress: 'string'
    startIpAddress: 'string'
  }
}

Property values

FirewallRuleProperties

Name Description Value
endIpAddress The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' to represent all Azure-internal IP addresses. string (required)
startIpAddress The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP addresses. string (required)

Microsoft.Sql/servers/firewallRules

Name Description Value
name The resource name string (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: servers
properties The properties representing the resource. FirewallRuleProperties

Quickstart samples

The following quickstart samples deploy this resource type.

Bicep File Description
Deploy the Sports Analytics on Azure Architecture Creates an Azure storage account with ADLS Gen 2 enabled, an Azure Data Factory instance with linked services for the storage account (an the Azure SQL Database if deployed), and an Azure Databricks instance. The AAD identity for the user deploying the template and the managed identity for the ADF instance will be granted the Storage Blob Data Contributor role on the storage account. There are also options to deploy an Azure Key Vault instance, an Azure SQL Database, and an Azure Event Hub (for streaming use cases). When an Azure Key Vault is deployed, the data factory managed identity and the AAD identity for the user deploying the template will be granted the Key Vault Secrets User role.
Provision a Web App with a SQL Database This template provisions a Web App, a SQL Database, AutoScale settings, Alert rules, and App Insights. It configures a connection string in the web app for the database.
Sonarqube Docker Web App on Linux with Azure SQL This template deploys Sonarqube in an Azure App Service web app Linux container using the official Sonarqube image and backed by an Azure SQL Server.
SQL logical server This template allows you to create SQL logical server.
Web App with Managed Identity, SQL Server and ΑΙ Simple example to deploy Azure infrastructure for app + data + managed identity + monitoring

ARM template resource definition

The servers/firewallRules resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Sql/servers/firewallRules resource, add the following JSON to your template.

{
  "type": "Microsoft.Sql/servers/firewallRules",
  "apiVersion": "2014-04-01",
  "name": "string",
  "properties": {
    "endIpAddress": "string",
    "startIpAddress": "string"
  }
}

Property values

FirewallRuleProperties

Name Description Value
endIpAddress The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' to represent all Azure-internal IP addresses. string (required)
startIpAddress The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP addresses. string (required)

Microsoft.Sql/servers/firewallRules

Name Description Value
apiVersion The api version '2014-04-01'
name The resource name string (required)
properties The properties representing the resource. FirewallRuleProperties
type The resource type 'Microsoft.Sql/servers/firewallRules'

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Deploy a new SQL Elastic Pool

Deploy to Azure
This template allows you to deploy a new SQL Elastic Pool with its new associated SQL Server and new SQL Databases to assign to it.
Deploy the Sports Analytics on Azure Architecture

Deploy to Azure
Creates an Azure storage account with ADLS Gen 2 enabled, an Azure Data Factory instance with linked services for the storage account (an the Azure SQL Database if deployed), and an Azure Databricks instance. The AAD identity for the user deploying the template and the managed identity for the ADF instance will be granted the Storage Blob Data Contributor role on the storage account. There are also options to deploy an Azure Key Vault instance, an Azure SQL Database, and an Azure Event Hub (for streaming use cases). When an Azure Key Vault is deployed, the data factory managed identity and the AAD identity for the user deploying the template will be granted the Key Vault Secrets User role.
Provision a Web App with a SQL Database

Deploy to Azure
This template provisions a Web App, a SQL Database, AutoScale settings, Alert rules, and App Insights. It configures a connection string in the web app for the database.
Sonarqube Docker Web App on Linux with Azure SQL

Deploy to Azure
This template deploys Sonarqube in an Azure App Service web app Linux container using the official Sonarqube image and backed by an Azure SQL Server.
SQL logical server

Deploy to Azure
This template allows you to create SQL logical server.
Web App with Managed Identity, SQL Server and ΑΙ

Deploy to Azure
Simple example to deploy Azure infrastructure for app + data + managed identity + monitoring

Terraform (AzAPI provider) resource definition

The servers/firewallRules resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Sql/servers/firewallRules resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Sql/servers/firewallRules@2014-04-01"
  name = "string"
  body = jsonencode({
    properties = {
      endIpAddress = "string"
      startIpAddress = "string"
    }
  })
}

Property values

FirewallRuleProperties

Name Description Value
endIpAddress The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' to represent all Azure-internal IP addresses. string (required)
startIpAddress The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP addresses. string (required)

Microsoft.Sql/servers/firewallRules

Name Description Value
name The resource name string (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: servers
properties The properties representing the resource. FirewallRuleProperties
type The resource type "Microsoft.Sql/servers/firewallRules@2014-04-01"