This module provides a generic way to create and manage Private DNS zones in Azure.
To use this module in your Terraform configuration, you'll need to provide values for the required variables. Here's a basic example:
module "azure_privatednszone" {
source = "./path_to_this_module"
// ... mandatory variables ...
domain_name = "your.domain.com"
resource_group_name = "existing_resourcegroup_name"
// ... other optional variables, see example ...
}
The following requirements are needed by this module:
The following resources are used by this module:
- azurerm_private_dns_a_record.this (resource)
- azurerm_private_dns_aaaa_record.this (resource)
- azurerm_private_dns_cname_record.this (resource)
- azurerm_private_dns_mx_record.this (resource)
- azurerm_private_dns_ptr_record.this (resource)
- azurerm_private_dns_srv_record.this (resource)
- azurerm_private_dns_txt_record.this (resource)
- azurerm_private_dns_zone.this (resource)
- azurerm_private_dns_zone_virtual_network_link.this (resource)
- modtm_telemetry.telemetry (resource)
- random_uuid.telemetry (resource)
- azurerm_client_config.telemetry (data source)
- modtm_module_source.telemetry (data source)
The following input variables are required:
Description: The name of the private dns zone.
Type: string
Description: The resource group where the resources will be deployed.
Type: string
The following input variables are optional (have default values):
Description: A map of objects where each object contains information to create a A record.
Type:
map(object({
name = string
resource_group_name = string
zone_name = string
ttl = number
records = list(string)
tags = optional(map(string), null)
}))
Default: {}
Description: A map of objects where each object contains information to create a AAAA record.
Type:
map(object({
name = string
resource_group_name = string
zone_name = string
ttl = number
records = list(string)
tags = optional(map(string), null)
}))
Default: {}
Description: A map of objects where each object contains information to create a CNAME record.
Type:
map(object({
name = string
resource_group_name = string
zone_name = string
ttl = number
record = string
tags = optional(map(string), null)
}))
Default: {}
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: true
Description: A map of objects where each object contains information to create a MX record.
Type:
map(object({
name = optional(string, "@")
resource_group_name = string
zone_name = string
ttl = number
records = map(object({
preference = number
exchange = string
}))
tags = optional(map(string), null)
}))
Default: {}
Description: A map of objects where each object contains information to create a PTR record.
Type:
map(object({
name = string
resource_group_name = string
zone_name = string
ttl = number
records = list(string)
tags = optional(map(string), null)
}))
Default: {}
Description: optional soa_record variable, if included only email is required, rest are optional. Email must use username.corp.com and not username@corp.com
Type:
object({
email = string
expire_time = optional(number, 2419200)
minimum_ttl = optional(number, 10)
refresh_time = optional(number, 3600)
retry_time = optional(number, 300)
ttl = optional(number, 3600)
tags = optional(map(string), null)
})
Default: null
Description: A map of objects where each object contains information to create a SRV record.
Type:
map(object({
name = string
resource_group_name = string
zone_name = string
ttl = number
records = map(object({
priority = number
weight = number
port = number
target = string
}))
tags = optional(map(string), null)
}))
Default: {}
Description: (Optional) Tags of the resource.
Type: map(string)
Default: null
Description: A map of objects where each object contains information to create a TXT record.
Type:
map(object({
name = string
resource_group_name = string
zone_name = string
ttl = number
records = map(object({
value = string
}))
tags = optional(map(string), null)
}))
Default: {}
Description: A map of objects where each object contains information to create a virtual network link.
Type:
map(object({
vnetlinkname = string
vnetid = string
autoregistration = optional(bool, false)
tags = optional(map(string), null)
}))
Default: {}
The following outputs are exported:
Description: The a record output
Description: The aaaa record output
Description: The cname record output
Description: The mx record output
Description: The name of private DNS zone
Description: The ptr record output
Description: The private dns zone output
Description: The resource id of private DNS zone
Description: The srv record output
Description: The txt record output
Description: The virtual network link output
No modules.
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.