1. Packages
  2. Azure Native
  3. API Docs
  4. privatedns
  5. VirtualNetworkLink
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

azure-native.privatedns.VirtualNetworkLink

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

Describes a link to virtual network for a Private DNS zone.

Uses Azure REST API version 2024-06-01.

Other available API versions: 2018-09-01, 2020-01-01, 2020-06-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native privatedns [ApiVersion]. See the version guide for details.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var virtualNetworkLink = new AzureNative.PrivateDns.VirtualNetworkLink("virtualNetworkLink", new()
    {
        Location = "Global",
        PrivateZoneName = "privatezone1.com",
        RegistrationEnabled = false,
        ResourceGroupName = "resourceGroup1",
        Tags = 
        {
            { "key1", "value1" },
        },
        VirtualNetwork = new AzureNative.PrivateDns.Inputs.SubResourceArgs
        {
            Id = "/subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName",
        },
        VirtualNetworkLinkName = "virtualNetworkLink1",
    });

});
Copy
package main

import (
	privatedns "github.com/pulumi/pulumi-azure-native-sdk/privatedns/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := privatedns.NewVirtualNetworkLink(ctx, "virtualNetworkLink", &privatedns.VirtualNetworkLinkArgs{
			Location:            pulumi.String("Global"),
			PrivateZoneName:     pulumi.String("privatezone1.com"),
			RegistrationEnabled: pulumi.Bool(false),
			ResourceGroupName:   pulumi.String("resourceGroup1"),
			Tags: pulumi.StringMap{
				"key1": pulumi.String("value1"),
			},
			VirtualNetwork: &privatedns.SubResourceArgs{
				Id: pulumi.String("/subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName"),
			},
			VirtualNetworkLinkName: pulumi.String("virtualNetworkLink1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.privatedns.VirtualNetworkLink;
import com.pulumi.azurenative.privatedns.VirtualNetworkLinkArgs;
import com.pulumi.azurenative.privatedns.inputs.SubResourceArgs;
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) {
        var virtualNetworkLink = new VirtualNetworkLink("virtualNetworkLink", VirtualNetworkLinkArgs.builder()
            .location("Global")
            .privateZoneName("privatezone1.com")
            .registrationEnabled(false)
            .resourceGroupName("resourceGroup1")
            .tags(Map.of("key1", "value1"))
            .virtualNetwork(SubResourceArgs.builder()
                .id("/subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName")
                .build())
            .virtualNetworkLinkName("virtualNetworkLink1")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const virtualNetworkLink = new azure_native.privatedns.VirtualNetworkLink("virtualNetworkLink", {
    location: "Global",
    privateZoneName: "privatezone1.com",
    registrationEnabled: false,
    resourceGroupName: "resourceGroup1",
    tags: {
        key1: "value1",
    },
    virtualNetwork: {
        id: "/subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName",
    },
    virtualNetworkLinkName: "virtualNetworkLink1",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

virtual_network_link = azure_native.privatedns.VirtualNetworkLink("virtualNetworkLink",
    location="Global",
    private_zone_name="privatezone1.com",
    registration_enabled=False,
    resource_group_name="resourceGroup1",
    tags={
        "key1": "value1",
    },
    virtual_network={
        "id": "/subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName",
    },
    virtual_network_link_name="virtualNetworkLink1")
Copy
resources:
  virtualNetworkLink:
    type: azure-native:privatedns:VirtualNetworkLink
    properties:
      location: Global
      privateZoneName: privatezone1.com
      registrationEnabled: false
      resourceGroupName: resourceGroup1
      tags:
        key1: value1
      virtualNetwork:
        id: /subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName
      virtualNetworkLinkName: virtualNetworkLink1
Copy

Create VirtualNetworkLink Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new VirtualNetworkLink(name: string, args: VirtualNetworkLinkArgs, opts?: CustomResourceOptions);
@overload
def VirtualNetworkLink(resource_name: str,
                       args: VirtualNetworkLinkArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def VirtualNetworkLink(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       private_zone_name: Optional[str] = None,
                       resource_group_name: Optional[str] = None,
                       location: Optional[str] = None,
                       registration_enabled: Optional[bool] = None,
                       resolution_policy: Optional[Union[str, ResolutionPolicy]] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       virtual_network: Optional[SubResourceArgs] = None,
                       virtual_network_link_name: Optional[str] = None)
func NewVirtualNetworkLink(ctx *Context, name string, args VirtualNetworkLinkArgs, opts ...ResourceOption) (*VirtualNetworkLink, error)
public VirtualNetworkLink(string name, VirtualNetworkLinkArgs args, CustomResourceOptions? opts = null)
public VirtualNetworkLink(String name, VirtualNetworkLinkArgs args)
public VirtualNetworkLink(String name, VirtualNetworkLinkArgs args, CustomResourceOptions options)
type: azure-native:privatedns:VirtualNetworkLink
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VirtualNetworkLinkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VirtualNetworkLinkArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VirtualNetworkLinkArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VirtualNetworkLinkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VirtualNetworkLinkArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var virtualNetworkLinkResource = new AzureNative.PrivateDns.VirtualNetworkLink("virtualNetworkLinkResource", new()
{
    PrivateZoneName = "string",
    ResourceGroupName = "string",
    Location = "string",
    RegistrationEnabled = false,
    ResolutionPolicy = "string",
    Tags = 
    {
        { "string", "string" },
    },
    VirtualNetwork = new AzureNative.PrivateDns.Inputs.SubResourceArgs
    {
        Id = "string",
    },
    VirtualNetworkLinkName = "string",
});
Copy
example, err := privatedns.NewVirtualNetworkLink(ctx, "virtualNetworkLinkResource", &privatedns.VirtualNetworkLinkArgs{
	PrivateZoneName:     pulumi.String("string"),
	ResourceGroupName:   pulumi.String("string"),
	Location:            pulumi.String("string"),
	RegistrationEnabled: pulumi.Bool(false),
	ResolutionPolicy:    pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	VirtualNetwork: &privatedns.SubResourceArgs{
		Id: pulumi.String("string"),
	},
	VirtualNetworkLinkName: pulumi.String("string"),
})
Copy
var virtualNetworkLinkResource = new VirtualNetworkLink("virtualNetworkLinkResource", VirtualNetworkLinkArgs.builder()
    .privateZoneName("string")
    .resourceGroupName("string")
    .location("string")
    .registrationEnabled(false)
    .resolutionPolicy("string")
    .tags(Map.of("string", "string"))
    .virtualNetwork(SubResourceArgs.builder()
        .id("string")
        .build())
    .virtualNetworkLinkName("string")
    .build());
Copy
virtual_network_link_resource = azure_native.privatedns.VirtualNetworkLink("virtualNetworkLinkResource",
    private_zone_name="string",
    resource_group_name="string",
    location="string",
    registration_enabled=False,
    resolution_policy="string",
    tags={
        "string": "string",
    },
    virtual_network={
        "id": "string",
    },
    virtual_network_link_name="string")
Copy
const virtualNetworkLinkResource = new azure_native.privatedns.VirtualNetworkLink("virtualNetworkLinkResource", {
    privateZoneName: "string",
    resourceGroupName: "string",
    location: "string",
    registrationEnabled: false,
    resolutionPolicy: "string",
    tags: {
        string: "string",
    },
    virtualNetwork: {
        id: "string",
    },
    virtualNetworkLinkName: "string",
});
Copy
type: azure-native:privatedns:VirtualNetworkLink
properties:
    location: string
    privateZoneName: string
    registrationEnabled: false
    resolutionPolicy: string
    resourceGroupName: string
    tags:
        string: string
    virtualNetwork:
        id: string
    virtualNetworkLinkName: string
Copy

VirtualNetworkLink Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The VirtualNetworkLink resource accepts the following input properties:

PrivateZoneName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Private DNS zone (without a terminating dot).
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
Location Changes to this property will trigger replacement. string
The Azure Region where the resource lives
RegistrationEnabled bool
Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
ResolutionPolicy string | Pulumi.AzureNative.PrivateDns.ResolutionPolicy
The resolution policy on the virtual network link. Only applicable for virtual network links to privatelink zones, and for A,AAAA,CNAME queries. When set to 'NxDomainRedirect', Azure DNS resolver falls back to public resolution if private dns query resolution results in non-existent domain response.
Tags Dictionary<string, string>
Resource tags.
VirtualNetwork Pulumi.AzureNative.PrivateDns.Inputs.SubResource
The reference of the virtual network.
VirtualNetworkLinkName Changes to this property will trigger replacement. string
The name of the virtual network link.
PrivateZoneName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Private DNS zone (without a terminating dot).
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
Location Changes to this property will trigger replacement. string
The Azure Region where the resource lives
RegistrationEnabled bool
Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
ResolutionPolicy string | ResolutionPolicy
The resolution policy on the virtual network link. Only applicable for virtual network links to privatelink zones, and for A,AAAA,CNAME queries. When set to 'NxDomainRedirect', Azure DNS resolver falls back to public resolution if private dns query resolution results in non-existent domain response.
Tags map[string]string
Resource tags.
VirtualNetwork SubResourceArgs
The reference of the virtual network.
VirtualNetworkLinkName Changes to this property will trigger replacement. string
The name of the virtual network link.
privateZoneName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Private DNS zone (without a terminating dot).
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
location Changes to this property will trigger replacement. String
The Azure Region where the resource lives
registrationEnabled Boolean
Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
resolutionPolicy String | ResolutionPolicy
The resolution policy on the virtual network link. Only applicable for virtual network links to privatelink zones, and for A,AAAA,CNAME queries. When set to 'NxDomainRedirect', Azure DNS resolver falls back to public resolution if private dns query resolution results in non-existent domain response.
tags Map<String,String>
Resource tags.
virtualNetwork SubResource
The reference of the virtual network.
virtualNetworkLinkName Changes to this property will trigger replacement. String
The name of the virtual network link.
privateZoneName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Private DNS zone (without a terminating dot).
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
location Changes to this property will trigger replacement. string
The Azure Region where the resource lives
registrationEnabled boolean
Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
resolutionPolicy string | ResolutionPolicy
The resolution policy on the virtual network link. Only applicable for virtual network links to privatelink zones, and for A,AAAA,CNAME queries. When set to 'NxDomainRedirect', Azure DNS resolver falls back to public resolution if private dns query resolution results in non-existent domain response.
tags {[key: string]: string}
Resource tags.
virtualNetwork SubResource
The reference of the virtual network.
virtualNetworkLinkName Changes to this property will trigger replacement. string
The name of the virtual network link.
private_zone_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the Private DNS zone (without a terminating dot).
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
location Changes to this property will trigger replacement. str
The Azure Region where the resource lives
registration_enabled bool
Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
resolution_policy str | ResolutionPolicy
The resolution policy on the virtual network link. Only applicable for virtual network links to privatelink zones, and for A,AAAA,CNAME queries. When set to 'NxDomainRedirect', Azure DNS resolver falls back to public resolution if private dns query resolution results in non-existent domain response.
tags Mapping[str, str]
Resource tags.
virtual_network SubResourceArgs
The reference of the virtual network.
virtual_network_link_name Changes to this property will trigger replacement. str
The name of the virtual network link.
privateZoneName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Private DNS zone (without a terminating dot).
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
location Changes to this property will trigger replacement. String
The Azure Region where the resource lives
registrationEnabled Boolean
Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
resolutionPolicy String | "Default" | "NxDomainRedirect"
The resolution policy on the virtual network link. Only applicable for virtual network links to privatelink zones, and for A,AAAA,CNAME queries. When set to 'NxDomainRedirect', Azure DNS resolver falls back to public resolution if private dns query resolution results in non-existent domain response.
tags Map<String>
Resource tags.
virtualNetwork Property Map
The reference of the virtual network.
virtualNetworkLinkName Changes to this property will trigger replacement. String
The name of the virtual network link.

Outputs

All input properties are implicitly available as output properties. Additionally, the VirtualNetworkLink resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
ProvisioningState string
The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
Type string
The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
VirtualNetworkLinkState string
The status of the virtual network link to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This is a read-only property and any attempt to set this value will be ignored.
Etag string
The ETag of the virtual network link.
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
ProvisioningState string
The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
Type string
The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
VirtualNetworkLinkState string
The status of the virtual network link to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This is a read-only property and any attempt to set this value will be ignored.
Etag string
The ETag of the virtual network link.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
provisioningState String
The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
type String
The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
virtualNetworkLinkState String
The status of the virtual network link to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This is a read-only property and any attempt to set this value will be ignored.
etag String
The ETag of the virtual network link.
azureApiVersion string
The Azure API version of the resource.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource
provisioningState string
The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
type string
The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
virtualNetworkLinkState string
The status of the virtual network link to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This is a read-only property and any attempt to set this value will be ignored.
etag string
The ETag of the virtual network link.
azure_api_version str
The Azure API version of the resource.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource
provisioning_state str
The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
type str
The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
virtual_network_link_state str
The status of the virtual network link to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This is a read-only property and any attempt to set this value will be ignored.
etag str
The ETag of the virtual network link.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
provisioningState String
The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
type String
The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
virtualNetworkLinkState String
The status of the virtual network link to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This is a read-only property and any attempt to set this value will be ignored.
etag String
The ETag of the virtual network link.

Supporting Types

ResolutionPolicy
, ResolutionPolicyArgs

Default
Default
NxDomainRedirect
NxDomainRedirect
ResolutionPolicyDefault
Default
ResolutionPolicyNxDomainRedirect
NxDomainRedirect
Default
Default
NxDomainRedirect
NxDomainRedirect
Default
Default
NxDomainRedirect
NxDomainRedirect
DEFAULT
Default
NX_DOMAIN_REDIRECT
NxDomainRedirect
"Default"
Default
"NxDomainRedirect"
NxDomainRedirect

SubResource
, SubResourceArgs

Id string
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
Id string
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
id String
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
id string
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
id str
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
id String
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.

SubResourceResponse
, SubResourceResponseArgs

Id string
Resource ID.
Id string
Resource ID.
id String
Resource ID.
id string
Resource ID.
id str
Resource ID.
id String
Resource ID.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:privatedns:VirtualNetworkLink virtualNetworkLink1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi