Search

Please login in for more filter options


Kickstart your project with AVM templates.

network-dnsresolver

report
Report Package network-dnsresolver

If you believe that this package or its contents contain harmful information, please inform us.
Please be aware that we will never share your credentials.

Please let us know what this package contains.
Please enter a valid email address.

This Terraform Azure Verified Module deploys: terraform-azurerm-avm-res-network-dnsresolver

ipm add --package avm-terraform/network-dnsresolver --version 0.8.0 

Published: 16-07-2025

Project URL: https://ipmhub.io/avm-terraform

Package Type: Terraform

License: MIT


terraform-azurerm-avm-res-network-dnsresolver

This is a module for deploying private dns resolver. It can be used to deploy the reosolver, inbound endpoints, outbound endpoints, forwarding rulesets and rules.

[!IMPORTANT] As the overall AVM framework is not GA (generally available) yet - the CI framework and test automation is not fully functional and implemented across all supported languages yet - breaking changes are expected, and additional customer feedback is yet to be gathered and incorporated. Hence, modules MUST NOT be published at version 1.0.0 or higher at this time.

All module MUST be published as a pre-release version (e.g., 0.1.0, 0.1.1, 0.2.0, etc.) until the AVM framework becomes GA.

However, it is important to note that this DOES NOT mean that the modules cannot be consumed and utilized. They CAN be leveraged in all types of environments (dev, test, prod etc.). Consumers can treat them just like any other IaC module and raise issues or feature requests against them as they learn from the usage of the module. Consumers should also read the release notes for each version, if considering updating to a more recent version of a module to see if there are any considerations or breaking changes etc.

Features And Notes

  • This module deploys a private dns resolver and optional inbound and outbound endpoints.
  • It also deploys optional forwarding rulesets and rules for outbound endpoints.
  • An existing virtual network with appropriately sized empty subnets is required.
  • For information on the Azure Private DNS Resolver service, see Private DNS Resolver.
  • For information on how to configure subnets for the resolver, see Inbound Endpoints and Outbound Endpoints.

Feedback

  • Your feedback is welcome! Please raise an issue or feature request on the module's GitHub repository.

Requirements

The following requirements are needed by this module:

Resources

The following resources are used by this module:

Required Inputs

The following input variables are required:

location

Description: Azure region where the resource should be deployed.

Type: string

name

Description: The name of the dns resolver.

Type: string

resource_group_name

Description: The resource group where the resources will be deployed.

Type: string

virtual_network_resource_id

Description: The ID of the virtual network to deploy the inbound and outbound endpoints into. The vnet should have appropriate subnets for the endpoints.
For more information on how to configure subnets for inbound and outbounbd endpoints, see the modules readme.

Type: string

Optional Inputs

The following input variables are optional (have default values):

enable_telemetry

Description: This variable controls whether or not telemetry is enabled for the module.
For more information see https://aka.ms/avm/telemetryinfo.
If it is set to false, then no telemetry will be collected.

Type: bool

Default: false

inbound_endpoints

Description: A map of inbound endpoints to create for this DNS resolver.

  • name - (Optional) The name of the inbound endpoint.
  • subnet_name - (Required) The name of the subnet within the virtual network specified by virtual_network_resource_id where the inbound endpoint will be deployed.
  • private_ip_allocation_method - (Optional) The allocation method for the private IP address. Possible values are Dynamic (default) or Static.
  • private_ip_address - (Optional) The static private IP address to assign if private_ip_allocation_method is set to Static.
  • tags - (Optional) A map of tags to assign to the inbound endpoint.
  • merge_with_module_tags - (Optional) Whether to merge the module tags with the inbound endpoint tags. Defaults to true.

Multiple inbound endpoints can be created by providing multiple entries in the map.

Type:

map(object({
    name                         = optional(string)
    subnet_name                  = string
    private_ip_allocation_method = optional(string, "Dynamic")
    private_ip_address           = optional(string, null)
    tags                         = optional(map(string), null)
    merge_with_module_tags       = optional(bool, true)
  }))

Default: {}

lock

Description: Controls the Resource Lock configuration for this resource. The following properties can be specified:

  • kind - (Required) The type of lock. Possible values are \"CanNotDelete\" and \"ReadOnly\".
  • name - (Optional) The name of the lock. If not specified, a name will be generated based on the kind value. Changing this forces the creation of a new resource.

Type:

object({
    kind = string
    name = optional(string, null)
  })

Default: null

outbound_endpoints

Description: A map of outbound endpoints to create for this DNS resolver.

  • name - (Optional) The name of the outbound endpoint.
  • tags - (Optional) A map of tags to assign to the outbound endpoint.
  • merge_with_module_tags - (Optional) Whether to merge the module tags with the outbound endpoint tags. Defaults to true.
  • subnet_name - (Required) The name of the subnet within the virtual network specified by virtual_network_resource_id where the outbound endpoint will be deployed.
  • forwarding_ruleset - (Optional) A map of forwarding rulesets to create for the outbound endpoint.
    • name - (Optional) The name of the forwarding ruleset.
    • link_with_outbound_endpoint_virtual_network - (Optional) Whether to link the forwarding ruleset with the outbound endpoint's virtual network. Defaults to true.
    • metadata_for_outbound_endpoint_virtual_network_link - (Optional) A map of metadata to associate with the virtual network link.
    • tags - (Optional) A map of tags to assign to the forwarding ruleset.
    • merge_with_module_tags - (Optional) Whether to merge the module tags with the forwarding ruleset tags. Defaults to true.
    • additional_outbound_endpoint_link - (Optional) An object to specify an additional outbound endpoint link.
      • outbound_endpoint_key - (Optional) The key of another outbound endpoint created in this module. See examples.
    • additional_virtual_network_links - (Optional) A map of additional virtual network links to create.
      • name - (Optional) The name of the additional virtual network link.
      • vnet_id - (Required) The ID of the virtual network to link to.
      • metadata - (Optional) A map of metadata to associate with the virtual network link.
    • rules - (Optional) A map of forwarding rules to create for the forwarding ruleset.
      • name - (Optional) The name of the forwarding rule.
      • domain_name - (Required) The domain name to forward.
      • destination_ip_addresses - (Required) A map where the key is the IP address and the value is the port.
      • enabled - (Optional) Whether the forwarding rule is enabled. Defaults to true.
      • metadata - (Optional) A map of metadata to associate with the forwarding rule.

Multiple outbound endpoints can be created by providing multiple entries in the map.

Type:

map(object({
    name                   = optional(string)
    tags                   = optional(map(string), null)
    merge_with_module_tags = optional(bool, true)
    subnet_name            = string
    forwarding_ruleset = optional(map(object({
      name                                                = optional(string)
      link_with_outbound_endpoint_virtual_network         = optional(bool, true)
      metadata_for_outbound_endpoint_virtual_network_link = optional(map(string), null)
      tags                                                = optional(map(string), null)
      merge_with_module_tags                              = optional(bool, true)
      additional_outbound_endpoint_link = optional(object({
        outbound_endpoint_key = optional(string)
      }), null)
      additional_virtual_network_links = optional(map(object({
        name     = optional(string)
        vnet_id  = string
        metadata = optional(map(string), null)
      })), {})
      rules = optional(map(object({
        name                     = optional(string)
        domain_name              = string
        destination_ip_addresses = map(string)
        enabled                  = optional(bool, true)
        metadata                 = optional(map(string), null)
      })))
    })))
  }))

Default: {}

role_assignments

Description: A map of role assignments to create on the . The map key is deliberately arbitrary to avoid issues where map keys maybe unknown at plan time.

  • role_definition_id_or_name - The ID or name of the role definition to assign to the principal.
  • principal_id - The ID of the principal to assign the role to.
  • description - (Optional) The description of the role assignment.
  • skip_service_principal_aad_check - (Optional) If set to true, skips the Azure Active Directory check for the service principal in the tenant. Defaults to false.
  • condition - (Optional) The condition which will be used to scope the role assignment.
  • condition_version - (Optional) The version of the condition syntax. Leave as null if you are not using a condition, if you are then valid values are '2.0'.
  • delegated_managed_identity_resource_id - (Optional) The delegated Azure Resource Id which contains a Managed Identity. Changing this forces a new resource to be created. This field is only used in cross-tenant scenario.
  • principal_type - (Optional) The type of the principal_id. Possible values are User, Group and ServicePrincipal. It is necessary to explicitly set this attribute when creating role assignments if the principal creating the assignment is constrained by ABAC rules that filters on the PrincipalType attribute.

Note: only set skip_service_principal_aad_check to true if you are assigning a role to a service principal.

Type:

map(object({
    role_definition_id_or_name             = string
    principal_id                           = string
    description                            = optional(string, null)
    skip_service_principal_aad_check       = optional(bool, false)
    condition                              = optional(string, null)
    condition_version                      = optional(string, null)
    delegated_managed_identity_resource_id = optional(string, null)
    principal_type                         = optional(string, null)
  }))

Default: {}

tags

Description: (Optional) Tags of the resource.

Type: map(string)

Default: null

Outputs

The following outputs are exported:

forwarding_rulesets

Description: The forwarding rulesets of the DNS resolver.

inbound_endpoint_ips

Description: The IP addresses of the inbound endpoints.

inbound_endpoints

Description: The inbound endpoints of the DNS resolver.

name

Description: The name of the DNS resolver.

outbound_endpoints

Description: The outbound endpoints of the DNS resolver.

resource

Description: This is the full output for the resource.

resource_id

Description: The ID of the DNS resolver.

Modules

No modules.

Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.

Release History

Version 0.8.0 - 2025-07-15

What's Changed

  • Forwarding rulesets can now be linked to an additional outbound endpoint. See new example: forwarding_ruleset_multiple_outbound_endpoints
  • Minimum azurerm version upgraded to 4.36.0 to support the above capability

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.7.5...0.8.0

Version 0.7.5 - 2025-06-11

What's Changed

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.7.4...0.7.5

Version 0.7.4 - 2025-06-09

What's Changed

  • Added the option to provide separate tags to inbound endpoints, outbound endpoints & forwarding rulesets
  • Added null protection for outbound endpoints

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.7.3...0.7.4

Version 0.7.3 - 2025-04-24

What's Changed

  • Added the option to provide a custom name for forwarding rulesets

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.7.2...0.7.3

Version 0.7.2 - 2025-03-02

What's Changed

  • Fix dependency on inbound / outbound endpoint names for resource creation. Thanks @alextitov1

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.7.1...0.7.2

Version 0.7.1 - 2025-02-10

What's Changed

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.7.0...0.7.1

Version 0.7.0 - 2025-01-30

What's Changed

New Contributors

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.6.0...0.7.0

Version 0.6.0 - 2025-01-23

What's Changed

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.5.0...0.6.0

Version 0.5.0 - 2025-01-21

What's Changed

  • feature/new_outputs by @humanascode in https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/pull/74
    • Added more outputs as requested on #73 New outputs are:
      • outbound_endpoints
      • inbound_endpoints
      • forwarding_rulesets
    • Breaking Change - Minimum supported AzureRM version updated to 4.0 and above as per the AVM program requirements. You can still use version 0.4.0 or earlier of this module for older AzureRM but these are static and dont get updated anymore. To use the latest features, please consider upgrading to AzureRM 4

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.4.0...0.5.0

Version 0.4.0 - 2024-10-14

What's Changed

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.3.0...0.4.0

Version 0.3.0 - 2024-10-09

What's Changed

  • Fixed typo in the default vnet link resource (issue #64 ) by @humanascode in https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/pull/66:
    • This is a breaking change. When upgrading to this version, users might be asked to recreate the default vnet link for outbound endpoints due to a resource name change. Please take this into consideration. The resource name change was done due to a typo in the original name and is not expected to change again in the future. replace

New Contributors

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.2.1...0.3.0

Version 0.2.1 - 2024-07-17

What's Changed

  • Upgraded telemetry

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.2.0...0.2.1

Version 0.2.0 - 2024-06-17

What's Changed

  • Added support for metadata property for vnet links - Breaking Change. type for additional vnet links changed from set to map of objects to facilitate more properties
  • New example for vnet links
  • Removed unused "state" property for forwarding rules
  • Added support for metadata and enabled properties for forwarding rules

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.1.2...0.2.0

Version 0.1.2 - 2024-05-20

What's Changed

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.1.1...0.1.2

Version 0.1.1 - 2024-05-18

What's Changed

New Contributors

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/compare/0.1.0...0.1.1

Version 0.1.0 - 2024-04-10

What's Changed

New Contributors

Full Changelog: https://github.com/Azure/terraform-azurerm-avm-res-network-dnsresolver/commits/0.1.0

 
 {
  "workingFolder": "packages",
  "packages": [
    // packages defined earlier
    {
      "name": "avm-terraform/network-dnsresolver",
      "version": "0.8.0"
    }
  ]
}

This package has no dependencies

Stats

Selected version:

0.8.0

Downloads this version:

0

Downloads all versions:

0

Latest version:

0.8.0

Latest update:

16-07-2025

avm-terraform

Other versions (16)

0.8.0

0.7.5

0.7.4

0.7.3

0.7.2

0.7.1

0.7.0

0.6.0

0.5.0

0.4.0

Ready to End Infrastructure Code Chaos?

Join infrastructure teams who've moved from scattered repositories to unified package management

Built by infrastructure experts
Who understand your challenges
Complete solutions
No scattered files
See what's deployed where
When it needs updates
Zero vendor lock-in
Packages work without us
No setup fees or contracts Free migration assistance Cancel anytime with no penalties
Direct founder access Zero security incidents in 2+ years Works with any cloud, any CI/CD platform