We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.privatedns.getZoneVirtualNetworkLink
Explore with Pulumi AI
Use this data source to access information about an existing Private DNS zone Virtual Network Link. These Links enable DNS resolution and registration inside Azure Virtual Networks using Azure Private DNS.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.privatedns.getZoneVirtualNetworkLink({
    name: "test",
    resourceGroupName: "test-rg",
    privateDnsZoneName: "test-zone",
});
export const privateDnsARecordId = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.privatedns.get_zone_virtual_network_link(name="test",
    resource_group_name="test-rg",
    private_dns_zone_name="test-zone")
pulumi.export("privateDnsARecordId", example.id)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := privatedns.LookupZoneVirtualNetworkLink(ctx, &privatedns.LookupZoneVirtualNetworkLinkArgs{
			Name:               "test",
			ResourceGroupName:  "test-rg",
			PrivateDnsZoneName: "test-zone",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("privateDnsARecordId", example.Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.PrivateDns.GetZoneVirtualNetworkLink.Invoke(new()
    {
        Name = "test",
        ResourceGroupName = "test-rg",
        PrivateDnsZoneName = "test-zone",
    });
    return new Dictionary<string, object?>
    {
        ["privateDnsARecordId"] = example.Apply(getZoneVirtualNetworkLinkResult => getZoneVirtualNetworkLinkResult.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.privatedns.PrivatednsFunctions;
import com.pulumi.azure.privatedns.inputs.GetZoneVirtualNetworkLinkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var example = PrivatednsFunctions.getZoneVirtualNetworkLink(GetZoneVirtualNetworkLinkArgs.builder()
            .name("test")
            .resourceGroupName("test-rg")
            .privateDnsZoneName("test-zone")
            .build());
        ctx.export("privateDnsARecordId", example.applyValue(getZoneVirtualNetworkLinkResult -> getZoneVirtualNetworkLinkResult.id()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:privatedns:getZoneVirtualNetworkLink
      arguments:
        name: test
        resourceGroupName: test-rg
        privateDnsZoneName: test-zone
outputs:
  privateDnsARecordId: ${example.id}
Using getZoneVirtualNetworkLink
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getZoneVirtualNetworkLink(args: GetZoneVirtualNetworkLinkArgs, opts?: InvokeOptions): Promise<GetZoneVirtualNetworkLinkResult>
function getZoneVirtualNetworkLinkOutput(args: GetZoneVirtualNetworkLinkOutputArgs, opts?: InvokeOptions): Output<GetZoneVirtualNetworkLinkResult>def get_zone_virtual_network_link(name: Optional[str] = None,
                                  private_dns_zone_name: Optional[str] = None,
                                  resource_group_name: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetZoneVirtualNetworkLinkResult
def get_zone_virtual_network_link_output(name: Optional[pulumi.Input[str]] = None,
                                  private_dns_zone_name: Optional[pulumi.Input[str]] = None,
                                  resource_group_name: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetZoneVirtualNetworkLinkResult]func LookupZoneVirtualNetworkLink(ctx *Context, args *LookupZoneVirtualNetworkLinkArgs, opts ...InvokeOption) (*LookupZoneVirtualNetworkLinkResult, error)
func LookupZoneVirtualNetworkLinkOutput(ctx *Context, args *LookupZoneVirtualNetworkLinkOutputArgs, opts ...InvokeOption) LookupZoneVirtualNetworkLinkResultOutput> Note: This function is named LookupZoneVirtualNetworkLink in the Go SDK.
public static class GetZoneVirtualNetworkLink 
{
    public static Task<GetZoneVirtualNetworkLinkResult> InvokeAsync(GetZoneVirtualNetworkLinkArgs args, InvokeOptions? opts = null)
    public static Output<GetZoneVirtualNetworkLinkResult> Invoke(GetZoneVirtualNetworkLinkInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetZoneVirtualNetworkLinkResult> getZoneVirtualNetworkLink(GetZoneVirtualNetworkLinkArgs args, InvokeOptions options)
public static Output<GetZoneVirtualNetworkLinkResult> getZoneVirtualNetworkLink(GetZoneVirtualNetworkLinkArgs args, InvokeOptions options)
fn::invoke:
  function: azure:privatedns/getZoneVirtualNetworkLink:getZoneVirtualNetworkLink
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the Private DNS Zone Virtual Network Link.
- PrivateDns stringZone Name 
- The name of the Private DNS zone (without a terminating dot).
- ResourceGroup stringName 
- Specifies the resource group where the Private DNS Zone exists.
- Name string
- The name of the Private DNS Zone Virtual Network Link.
- PrivateDns stringZone Name 
- The name of the Private DNS zone (without a terminating dot).
- ResourceGroup stringName 
- Specifies the resource group where the Private DNS Zone exists.
- name String
- The name of the Private DNS Zone Virtual Network Link.
- privateDns StringZone Name 
- The name of the Private DNS zone (without a terminating dot).
- resourceGroup StringName 
- Specifies the resource group where the Private DNS Zone exists.
- name string
- The name of the Private DNS Zone Virtual Network Link.
- privateDns stringZone Name 
- The name of the Private DNS zone (without a terminating dot).
- resourceGroup stringName 
- Specifies the resource group where the Private DNS Zone exists.
- name str
- The name of the Private DNS Zone Virtual Network Link.
- private_dns_ strzone_ name 
- The name of the Private DNS zone (without a terminating dot).
- resource_group_ strname 
- Specifies the resource group where the Private DNS Zone exists.
- name String
- The name of the Private DNS Zone Virtual Network Link.
- privateDns StringZone Name 
- The name of the Private DNS zone (without a terminating dot).
- resourceGroup StringName 
- Specifies the resource group where the Private DNS Zone exists.
getZoneVirtualNetworkLink Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- PrivateDns stringZone Name 
- RegistrationEnabled bool
- Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
- ResourceGroup stringName 
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- VirtualNetwork stringId 
- The ID of the Virtual Network that is linked to the DNS Zone.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- PrivateDns stringZone Name 
- RegistrationEnabled bool
- Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
- ResourceGroup stringName 
- map[string]string
- A mapping of tags to assign to the resource.
- VirtualNetwork stringId 
- The ID of the Virtual Network that is linked to the DNS Zone.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- privateDns StringZone Name 
- registrationEnabled Boolean
- Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
- resourceGroup StringName 
- Map<String,String>
- A mapping of tags to assign to the resource.
- virtualNetwork StringId 
- The ID of the Virtual Network that is linked to the DNS Zone.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- privateDns stringZone Name 
- registrationEnabled boolean
- Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
- resourceGroup stringName 
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- virtualNetwork stringId 
- The ID of the Virtual Network that is linked to the DNS Zone.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- private_dns_ strzone_ name 
- registration_enabled bool
- Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
- resource_group_ strname 
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- virtual_network_ strid 
- The ID of the Virtual Network that is linked to the DNS Zone.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- privateDns StringZone Name 
- registrationEnabled Boolean
- Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
- resourceGroup StringName 
- Map<String>
- A mapping of tags to assign to the resource.
- virtualNetwork StringId 
- The ID of the Virtual Network that is linked to the DNS Zone.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.