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

private_dns_srv_record_test.tf#L14
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

terraform.tf#L23
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 {
private_dns_srv_record_test.tf#L14
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

main.tf#L7
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
module.tf#L67
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
main.tf#L7
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
module.tf#L67
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
module.tf#L67
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
module.tf#L67
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
module.tf#L67
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

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

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.