Microsoft.Network dnsForwardingRulesets/forwardingRules

Bicep resource definition

The dnsForwardingRulesets/forwardingRules resource type can be deployed to:

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@2022-07-01' = {
  name: 'string'
  parent: resourceSymbolicName
  properties: {
    domainName: 'string'
    forwardingRuleState: 'string'
    metadata: {}
    targetDnsServers: [
      {
        ipAddress: 'string'
        port: int
      }
    ]
  }
}

Property values

dnsForwardingRulesets/forwardingRules

Name Description Value
name The resource name

See how to set names and types for child resources in Bicep.
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)

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. object
targetDnsServers DNS servers to forward the DNS query to. TargetDnsServer[] (required)

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.

ARM template resource definition

The dnsForwardingRulesets/forwardingRules resource type can be deployed to:

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": "2022-07-01",
  "name": "string",
  "properties": {
    "domainName": "string",
    "forwardingRuleState": "string",
    "metadata": {},
    "targetDnsServers": [
      {
        "ipAddress": "string",
        "port": "int"
      }
    ]
  }
}

Property values

dnsForwardingRulesets/forwardingRules

Name Description Value
type The resource type 'Microsoft.Network/dnsForwardingRulesets/forwardingRules'
apiVersion The resource api version '2022-07-01'
name The resource name

See how to set names and types for child resources in JSON ARM templates.
string (required)
properties Properties of the forwarding rule. ForwardingRuleProperties (required)

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. object
targetDnsServers DNS servers to forward the DNS query to. TargetDnsServer[] (required)

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 to:

  • 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@2022-07-01"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      domainName = "string"
      forwardingRuleState = "string"
      metadata = {}
      targetDnsServers = [
        {
          ipAddress = "string"
          port = int
        }
      ]
    }
  })
}

Property values

dnsForwardingRulesets/forwardingRules

Name Description Value
type The resource type "Microsoft.Network/dnsForwardingRulesets/forwardingRules@2022-07-01"
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)

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. object
targetDnsServers DNS servers to forward the DNS query to. TargetDnsServer[] (required)

TargetDnsServer

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