https://github.com/telekom-mms/terraform-azurerm-dns
A Terraform module that manages the container resources from the azurerm provider.
https://github.com/telekom-mms/terraform-azurerm-dns
azure azure-dns-zone dns-a-record dns-cname-record dns-txt-record dns-zone private-dns-zone terraform terraform-module
Last synced: 2 months ago
JSON representation
A Terraform module that manages the container resources from the azurerm provider.
- Host: GitHub
- URL: https://github.com/telekom-mms/terraform-azurerm-dns
- Owner: telekom-mms
- License: mpl-2.0
- Created: 2021-12-15T12:51:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-27T18:46:56.000Z (3 months ago)
- Last Synced: 2025-03-27T18:50:20.000Z (3 months ago)
- Topics: azure, azure-dns-zone, dns-a-record, dns-cname-record, dns-txt-record, dns-zone, private-dns-zone, terraform, terraform-module
- Language: HCL
- Homepage: https://telekom-mms.github.io/terraform-template
- Size: 62.5 KB
- Stars: 0
- Watchers: 2
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# dns
This module manages the hashicorp/azurerm dns and private dns resources.
For more information see https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs > dns
and https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs > private dns_<-- This file is autogenerated, please do not change. -->_
## Requirements
| Name | Version |
|------|---------|
| terraform | >=1.5 |
| azurerm | >=3.72.0, <4.0 |## Providers
| Name | Version |
|------|---------|
| azurerm | >=3.72.0, <4.0 |## Resources
| Name | Type |
|------|------|
| azurerm_dns_a_record.dns_a_record | resource |
| azurerm_dns_cname_record.dns_cname_record | resource |
| azurerm_dns_mx_record.dns_mx_record | resource |
| azurerm_dns_txt_record.dns_txt_record | resource |
| azurerm_dns_zone.dns_zone | resource |
| azurerm_private_dns_a_record.private_dns_a_record | resource |
| azurerm_private_dns_cname_record.private_dns_cname_record | resource |
| azurerm_private_dns_mx_record.private_dns_mx_record | resource |
| azurerm_private_dns_txt_record.private_dns_txt_record | resource |
| azurerm_private_dns_zone.private_dns_zone | resource |
| azurerm_private_dns_zone_virtual_network_link.private_dns_zone_virtual_network_link | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| dns_a_record | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
| dns_cname_record | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
| dns_mx_record | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
| dns_txt_record | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
| dns_zone | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
| private_dns_a_record | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
| private_dns_cname_record | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
| private_dns_mx_record | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
| private_dns_txt_record | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
| private_dns_zone | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
| private_dns_zone_virtual_network_link | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |## Outputs
| Name | Description |
|------|-------------|
| dns_a_record | Outputs all attributes of resource_type. |
| dns_cname_record | Outputs all attributes of resource_type. |
| dns_mx_record | Outputs all attributes of resource_type. |
| dns_txt_record | Outputs all attributes of resource_type. |
| dns_zone | Outputs all attributes of resource_type. |
| private_dns_a_record | Outputs all attributes of resource_type. |
| private_dns_cname_record | Outputs all attributes of resource_type. |
| private_dns_mx_record | Outputs all attributes of resource_type. |
| private_dns_txt_record | Outputs all attributes of resource_type. |
| private_dns_zone | Outputs all attributes of resource_type. |
| private_dns_zone_virtual_network_link | Outputs all attributes of resource_type. |
| variables | Displays all configurable variables passed by the module. __default__ = predefined values per module. __merged__ = result of merging the default values and custom values passed to the module |## Examples
Minimal configuration to install the desired resources with the module
```hcl
module "network" {
source = "registry.terraform.io/telekom-mms/network/azurerm"
virtual_network = {
vn-app-mms = {
location = "westeurope"
resource_group_name = "rg-mms-github"
address_space = ["173.0.0.0/23"]
}
}
}module "dns" {
source = "registry.terraform.io/telekom-mms/dns/azurerm"
dns_zone = {
"mms-github-plattform.com" = {
resource_group_name = "rg-mms-github"
}
}
private_dns_zone = {
"mms-github-privat-plattform.com" = {
resource_group_name = "rg-mms-github"
}
}
dns_a_record = {
"@" = {
resource_group_name = module.dns.dns_zone["mms-github-plattform.com"].resource_group_name
zone_name = module.dns.dns_zone["mms-github-plattform.com"].name
records = ["127.0.0.2"]
}
}
dns_cname_record = {
www = {
resource_group_name = module.dns.dns_zone["mms-github-plattform.com"].resource_group_name
zone_name = module.dns.dns_zone["mms-github-plattform.com"].name
record = module.dns.dns_a_record["@"].fqdn
}
}
dns_txt_record = {
dnsauth = {
resource_group_name = module.dns.dns_zone["mms-github-plattform.com"].resource_group_name
zone_name = module.dns.dns_zone["mms-github-plattform.com"].name
record = {
frontdoor = {
value = "frontdoor"
}
}
}
}
dns_mx_record = {
mail = {
resource_group_name = module.dns.dns_zone["mms-github-plattform.com"].resource_group_name
zone_name = module.dns.dns_zone["mms-github-plattform.com"].name
record = {
mail1 = {
preference = 10
exchange = "mail1.telekom-mms.com"
}
}
}
}
private_dns_a_record = {
"@" = {
resource_group_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].resource_group_name
zone_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].name
records = ["127.0.0.3"]
}
}
private_dns_cname_record = {
www = {
resource_group_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].resource_group_name
zone_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].name
record = module.dns.private_dns_a_record["@"].fqdn
}
}
private_dns_txt_record = {
dnsauth = {
resource_group_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].resource_group_name
zone_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].name
record = {
frontdoor = {
value = "frontdoor"
}
}
}
}
private_dns_mx_record = {
mail = {
resource_group_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].resource_group_name
zone_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].name
record = {
mail1 = {
preference = 10
exchange = "mail1.telekom-mms.com"
}
}
}
}
private_dns_zone_virtual_network_link = {
pl-mms-github = {
resource_group_name = "rg-mms-github"
private_dns_zone_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].name
virtual_network_id = module.network.virtual_network["vn-app-mms"].id
}
}
}
```Advanced configuration to install the desired resources with the module
```hcl
module "network" {
source = "registry.terraform.io/telekom-mms/network/azurerm"
virtual_network = {
vn-app-mms = {
location = "westeurope"
resource_group_name = "rg-mms-github"
address_space = ["173.0.0.0/23"]
}
}
}module "dns" {
source = "registry.terraform.io/telekom-mms/dns/azurerm"
dns_zone = {
"mms-github-plattform.com" = {
resource_group_name = "rg-mms-github"
soa_record = {
email = "telekom-mms.com"
}
tags = {
project = "mms-github"
environment = terraform.workspace
managed-by = "terraform"
}
}
}
private_dns_zone = {
"mms-github-privat-plattform.com" = {
resource_group_name = "rg-mms-github"
soa_record = {
email = "telekom-mms.com"
}
tags = {
project = "mms-github"
environment = terraform.workspace
managed-by = "terraform"
}
}
}
dns_a_record = {
"@" = {
resource_group_name = module.dns.dns_zone["mms-github-plattform.com"].resource_group_name
zone_name = module.dns.dns_zone["mms-github-plattform.com"].name
records = ["127.0.0.2"]
tags = {
project = "mms-github"
environment = terraform.workspace
managed-by = "terraform"
}
}
}
dns_cname_record = {
www = {
resource_group_name = module.dns.dns_zone["mms-github-plattform.com"].resource_group_name
zone_name = module.dns.dns_zone["mms-github-plattform.com"].name
record = module.dns.dns_a_record["@"].fqdn
tags = {
project = "mms-github"
environment = terraform.workspace
managed-by = "terraform"
}
}
}
dns_txt_record = {
dnsauth = {
resource_group_name = module.dns.dns_zone["mms-github-plattform.com"].resource_group_name
zone_name = module.dns.dns_zone["mms-github-plattform.com"].name
record = {
frontdoor = {
value = "frontdoor"
}
}
tags = {
project = "mms-github"
environment = terraform.workspace
managed-by = "terraform"
}
}
}
dns_mx_record = {
mail = {
resource_group_name = module.dns.dns_zone["mms-github-plattform.com"].resource_group_name
zone_name = module.dns.dns_zone["mms-github-plattform.com"].name
record = {
mail1 = {
preference = 10
exchange = "mail1.telekom-mms.com"
}
mail2 = {
preference = 20
exchange = "mail2.telekom-mms.com"
}
}
tags = {
project = "mms-github"
environment = terraform.workspace
managed-by = "terraform"
}
}
}
private_dns_a_record = {
"@" = {
resource_group_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].resource_group_name
zone_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].name
records = ["127.0.0.3"]
tags = {
project = "mms-github"
environment = terraform.workspace
managed-by = "terraform"
}
}
}
private_dns_cname_record = {
www = {
resource_group_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].resource_group_name
zone_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].name
record = module.dns.private_dns_a_record["@"].fqdn
tags = {
project = "mms-github"
environment = terraform.workspace
managed-by = "terraform"
}
}
}
private_dns_txt_record = {
dnsauth = {
resource_group_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].resource_group_name
zone_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].name
record = {
frontdoor = {
value = "frontdoor"
}
}
tags = {
project = "mms-github"
environment = terraform.workspace
managed-by = "terraform"
}
}
}
private_dns_mx_record = {
mail = {
resource_group_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].resource_group_name
zone_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].name
record = {
mail1 = {
preference = 10
exchange = "mail1.telekom-mms.com"
}
mail2 = {
preference = 20
exchange = "mail2.telekom-mms.com"
}
}
tags = {
project = "mms-github"
environment = terraform.workspace
managed-by = "terraform"
}
}
}
private_dns_zone_virtual_network_link = {
pl-mms-github = {
resource_group_name = "rg-mms-github"
private_dns_zone_name = module.dns.private_dns_zone["mms-github-privat-plattform.com"].name
virtual_network_id = module.network.virtual_network["vn-app-mms"].id
tags = {
project = "mms-github"
environment = terraform.workspace
managed-by = "terraform"
}
}
}
}
```