Microsoft.Network dnsForwardingRulesets/forwardingRules

Bicep resource definition

The dnsForwardingRulesets/forwardingRules 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.Network/dnsForwardingRulesets/forwardingRules resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Network/dnsForwardingRulesets/forwardingRules@2023-07-01-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    domainName: 'string'
    forwardingRuleState: 'string'
    metadata: {
      {customized property}: 'string'
    }
    targetDnsServers: [
      {
        ipAddress: 'string'
        port: int
      }
    ]
  }
}

Property values

ForwardingRuleProperties

Name Description Value
domainName The domain name for the forwarding rule. string (required)
forwardingRuleState The state of forwarding rule. 'Disabled'
'Enabled'
metadata Metadata attached to the forwarding rule. ForwardingRulePropertiesMetadata
targetDnsServers DNS servers to forward the DNS query to. TargetDnsServer[] (required)

ForwardingRulePropertiesMetadata

Name Description Value

Microsoft.Network/dnsForwardingRulesets/forwardingRules

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: dnsForwardingRulesets
properties Properties of the forwarding rule. ForwardingRuleProperties (required)

TargetDnsServer

Name Description Value
ipAddress DNS server IP address. string (required)
port DNS server port. int

Quickstart samples

The following quickstart samples deploy this resource type.

Bicep File Description
Azure DNS Private Resolver This template provisions Azure DNS Private Resolver in a virtual network with required forwarding ruleset and rules. It creates a new virtual network with two subnets, and deploy Azure DNS Private Resolver in this VNET.

ARM template resource definition

The dnsForwardingRulesets/forwardingRules 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.Network/dnsForwardingRulesets/forwardingRules resource, add the following JSON to your template.

{
  "type": "Microsoft.Network/dnsForwardingRulesets/forwardingRules",
  "apiVersion": "2023-07-01-preview",
  "name": "string",
  "properties": {
    "domainName": "string",
    "forwardingRuleState": "string",
    "metadata": {
      "{customized property}": "string"
    },
    "targetDnsServers": [
      {
        "ipAddress": "string",
        "port": "int"
      }
    ]
  }
}

Property values

ForwardingRuleProperties

Name Description Value
domainName The domain name for the forwarding rule. string (required)
forwardingRuleState The state of forwarding rule. 'Disabled'
'Enabled'
metadata Metadata attached to the forwarding rule. ForwardingRulePropertiesMetadata
targetDnsServers DNS servers to forward the DNS query to. TargetDnsServer[] (required)

ForwardingRulePropertiesMetadata

Name Description Value

Microsoft.Network/dnsForwardingRulesets/forwardingRules

Name Description Value
apiVersion The api version '2023-07-01-preview'
name The resource name string (required)
properties Properties of the forwarding rule. ForwardingRuleProperties (required)
type The resource type 'Microsoft.Network/dnsForwardingRulesets/forwardingRules'

TargetDnsServer

Name Description Value
ipAddress DNS server IP address. string (required)
port DNS server port. int

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Azure DNS Private Resolver

Deploy to Azure
This template provisions Azure DNS Private Resolver in a virtual network with required forwarding ruleset and rules. It creates a new virtual network with two subnets, and deploy Azure DNS Private Resolver in this VNET.

Terraform (AzAPI provider) resource definition

The dnsForwardingRulesets/forwardingRules 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.Network/dnsForwardingRulesets/forwardingRules resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/dnsForwardingRulesets/forwardingRules@2023-07-01-preview"
  name = "string"
  body = jsonencode({
    properties = {
      domainName = "string"
      forwardingRuleState = "string"
      metadata = {
        {customized property} = "string"
      }
      targetDnsServers = [
        {
          ipAddress = "string"
          port = int
        }
      ]
    }
  })
}

Property values

ForwardingRuleProperties

Name Description Value
domainName The domain name for the forwarding rule. string (required)
forwardingRuleState The state of forwarding rule. 'Disabled'
'Enabled'
metadata Metadata attached to the forwarding rule. ForwardingRulePropertiesMetadata
targetDnsServers DNS servers to forward the DNS query to. TargetDnsServer[] (required)

ForwardingRulePropertiesMetadata

Name Description Value

Microsoft.Network/dnsForwardingRulesets/forwardingRules

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: dnsForwardingRulesets
properties Properties of the forwarding rule. ForwardingRuleProperties (required)
type The resource type "Microsoft.Network/dnsForwardingRulesets/forwardingRules@2023-07-01-preview"

TargetDnsServer

Name Description Value
ipAddress DNS server IP address. string (required)
port DNS server port. int