Azure Private DNS SRV Record
This page shows how to write Terraform and Azure Resource Manager for Private DNS SRV Record and write them securely.
azurerm_private_dns_srv_record (Terraform)
The SRV Record in Private DNS can be configured in Terraform with the resource name azurerm_private_dns_srv_record
. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_private_dns_srv_record" "over1B" {
name = "test"
resource_group_name = azurerm_resource_group.test.name
zone_name = azurerm_private_dns_zone.test.name
ttl = 300
resource "azurerm_private_dns_srv_record" "othertestptr" {
name = "othertestptr"
zone_name = azurerm_private_dns_zone.testzone.name
resource_group_name = data.azurerm_resource_group.example.name
ttl = 300
record {
resource "azurerm_private_dns_srv_record" "over1B" {
name = "test"
resource_group_name = azurerm_resource_group.test.name
zone_name = azurerm_private_dns_zone.test.name
ttl = 300
resource "azurerm_private_dns_srv_record" "this" {
name = var.name
resource_group_name = var.resource_group_name
tags = var.tags
ttl = var.ttl
zone_name = var.zone_name
resource "azurerm_private_dns_srv_record" "srv_records" {
for_each = try(var.records.srv_records, {})
name = each.value.name
resource_group_name = var.resource_group_name
zone_name = azurerm_private_dns_zone.private_dns.name
resource "azurerm_private_dns_srv_record" "this" {
name = var.name
resource_group_name = var.resource_group_name
tags = var.tags
ttl = var.ttl
zone_name = var.zone_name
resource "azurerm_private_dns_srv_record" "srv_records" {
for_each = try(var.records.srv_records, {})
name = each.value.name
resource_group_name = var.resource_group_name
zone_name = azurerm_private_dns_zone.private_dns.name
resource "azurerm_private_dns_srv_record" "srv_records" {
for_each = try(var.records.srv_records, {})
name = each.value.name
resource_group_name = var.resource_group_name
zone_name = azurerm_private_dns_zone.private_dns.name
resource "azurerm_private_dns_srv_record" "srv_records" {
for_each = try(var.records.srv_records, {})
name = each.value.name
resource_group_name = var.resource_group_name
zone_name = azurerm_private_dns_zone.private_dns.name
resource "azurerm_private_dns_srv_record" "srv_records" {
for_each = try(var.records.srv_records, {})
name = each.value.name
resource_group_name = var.resource_group_name
zone_name = azurerm_private_dns_zone.private_dns.name
Parameters
-
fqdn
optional computed - string -
id
optional computed - string -
name
required - string -
resource_group_name
required - string -
tags
optional - map from string to string -
ttl
required - number -
zone_name
required - string -
record
set block -
timeouts
single block
Explanation in Terraform Registry
Enables you to manage DNS SRV Records within Azure Private DNS.
Microsoft.Network/privateDnsZones/SRV (Azure Resource Manager)
The privateDnsZones/SRV in Microsoft.Network can be configured in Azure Resource Manager with the resource name Microsoft.Network/privateDnsZones/SRV
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Frequently asked questions
What is Azure Private DNS SRV Record?
Azure Private DNS SRV Record is a resource for Private DNS of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Private DNS SRV Record?
For Terraform, the gilyas/infracost, cloudskiff/driftctl and infracost/infracost source code examples are useful. See the Terraform Example section for further details.