Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The servers/outboundFirewallRules resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Sql/servers/outboundFirewallRules resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Sql/servers/outboundFirewallRules@2024-11-01-preview' = {
parent: resourceSymbolicName
name: 'string'
}
Property Values
Microsoft.Sql/servers/outboundFirewallRules
| 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 |
Usage Examples
Bicep Samples
A basic example of deploying Azure SQL Outbound Firewall Rule.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
@secure()
@description('Admin password for the database')
param adminPassword string
resource server 'Microsoft.Sql/servers@2021-02-01-preview' = {
name: resourceName
location: location
properties: {
administratorLogin: 'msincredible'
administratorLoginPassword: null
minimalTlsVersion: '1.2'
publicNetworkAccess: 'Enabled'
restrictOutboundNetworkAccess: 'Enabled'
version: '12.0'
}
}
resource outboundFirewallRule 'Microsoft.Sql/servers/outboundFirewallRules@2021-02-01-preview' = {
parent: server
name: 'sql230630033612934212.database.windows.net'
properties: {}
}
ARM template resource definition
The servers/outboundFirewallRules resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Sql/servers/outboundFirewallRules resource, add the following JSON to your template.
{
"type": "Microsoft.Sql/servers/outboundFirewallRules",
"apiVersion": "2024-11-01-preview",
"name": "string"
}
Property Values
Microsoft.Sql/servers/outboundFirewallRules
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2024-11-01-preview' |
| name | The resource name | string (required) |
| type | The resource type | 'Microsoft.Sql/servers/outboundFirewallRules' |
Usage Examples
Terraform (AzAPI provider) resource definition
The servers/outboundFirewallRules 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/outboundFirewallRules resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Sql/servers/outboundFirewallRules@2024-11-01-preview"
name = "string"
parent_id = "string"
}
Property Values
Microsoft.Sql/servers/outboundFirewallRules
| 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 |
| type | The resource type | "Microsoft.Sql/servers/outboundFirewallRules@2024-11-01-preview" |
Usage Examples
Terraform Samples
A basic example of deploying Azure SQL Outbound Firewall Rule.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
variable "admin_password" {
description = "Admin password for the database"
type = string
sensitive = true
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "server" {
type = "Microsoft.Sql/servers@2021-02-01-preview"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
administratorLogin = "msincredible"
administratorLoginPassword = var.admin_password
minimalTlsVersion = "1.2"
publicNetworkAccess = "Enabled"
restrictOutboundNetworkAccess = "Enabled"
version = "12.0"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "outboundFirewallRule" {
type = "Microsoft.Sql/servers/outboundFirewallRules@2021-02-01-preview"
parent_id = azapi_resource.server.id
name = "sql230630033612934212.database.windows.net"
body = {
properties = {
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}