1. Packages
  2. Azure Classic
  3. API Docs
  4. privatedns
  5. ZoneVirtualNetworkLink

We recommend using Azure Native.

Azure Classic v5.67.0 published on Wednesday, Feb 21, 2024 by Pulumi

azure.privatedns.ZoneVirtualNetworkLink

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.67.0 published on Wednesday, Feb 21, 2024 by Pulumi

    Enables you to manage Private DNS zone Virtual Network Links. These Links enable DNS resolution and registration inside Azure Virtual Networks using Azure Private DNS.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
        {
            Location = "West Europe",
        });
    
        var exampleZone = new Azure.PrivateDns.Zone("exampleZone", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
        });
    
        var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new()
        {
            AddressSpaces = new[]
            {
                "10.0.0.0/16",
            },
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
        });
    
        var exampleZoneVirtualNetworkLink = new Azure.PrivateDns.ZoneVirtualNetworkLink("exampleZoneVirtualNetworkLink", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
            PrivateDnsZoneName = exampleZone.Name,
            VirtualNetworkId = exampleVirtualNetwork.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatedns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleZone, err := privatedns.NewZone(ctx, "exampleZone", &privatedns.ZoneArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("10.0.0.0/16"),
    			},
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = privatedns.NewZoneVirtualNetworkLink(ctx, "exampleZoneVirtualNetworkLink", &privatedns.ZoneVirtualNetworkLinkArgs{
    			ResourceGroupName:  exampleResourceGroup.Name,
    			PrivateDnsZoneName: exampleZone.Name,
    			VirtualNetworkId:   exampleVirtualNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.privatedns.Zone;
    import com.pulumi.azure.privatedns.ZoneArgs;
    import com.pulumi.azure.network.VirtualNetwork;
    import com.pulumi.azure.network.VirtualNetworkArgs;
    import com.pulumi.azure.privatedns.ZoneVirtualNetworkLink;
    import com.pulumi.azure.privatedns.ZoneVirtualNetworkLinkArgs;
    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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
                .location("West Europe")
                .build());
    
            var exampleZone = new Zone("exampleZone", ZoneArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .build());
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()        
                .addressSpaces("10.0.0.0/16")
                .location(exampleResourceGroup.location())
                .resourceGroupName(exampleResourceGroup.name())
                .build());
    
            var exampleZoneVirtualNetworkLink = new ZoneVirtualNetworkLink("exampleZoneVirtualNetworkLink", ZoneVirtualNetworkLinkArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .privateDnsZoneName(exampleZone.name())
                .virtualNetworkId(exampleVirtualNetwork.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_zone = azure.privatedns.Zone("exampleZone", resource_group_name=example_resource_group.name)
    example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
        address_spaces=["10.0.0.0/16"],
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name)
    example_zone_virtual_network_link = azure.privatedns.ZoneVirtualNetworkLink("exampleZoneVirtualNetworkLink",
        resource_group_name=example_resource_group.name,
        private_dns_zone_name=example_zone.name,
        virtual_network_id=example_virtual_network.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleZone = new azure.privatedns.Zone("exampleZone", {resourceGroupName: exampleResourceGroup.name});
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
        addressSpaces: ["10.0.0.0/16"],
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
    });
    const exampleZoneVirtualNetworkLink = new azure.privatedns.ZoneVirtualNetworkLink("exampleZoneVirtualNetworkLink", {
        resourceGroupName: exampleResourceGroup.name,
        privateDnsZoneName: exampleZone.name,
        virtualNetworkId: exampleVirtualNetwork.id,
    });
    
    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        properties:
          location: West Europe
      exampleZone:
        type: azure:privatedns:Zone
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
      exampleZoneVirtualNetworkLink:
        type: azure:privatedns:ZoneVirtualNetworkLink
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          privateDnsZoneName: ${exampleZone.name}
          virtualNetworkId: ${exampleVirtualNetwork.id}
      exampleVirtualNetwork:
        type: azure:network:VirtualNetwork
        properties:
          addressSpaces:
            - 10.0.0.0/16
          location: ${exampleResourceGroup.location}
          resourceGroupName: ${exampleResourceGroup.name}
    

    Create ZoneVirtualNetworkLink Resource

    new ZoneVirtualNetworkLink(name: string, args: ZoneVirtualNetworkLinkArgs, opts?: CustomResourceOptions);
    @overload
    def ZoneVirtualNetworkLink(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               name: Optional[str] = None,
                               private_dns_zone_name: Optional[str] = None,
                               registration_enabled: Optional[bool] = None,
                               resource_group_name: Optional[str] = None,
                               tags: Optional[Mapping[str, str]] = None,
                               virtual_network_id: Optional[str] = None)
    @overload
    def ZoneVirtualNetworkLink(resource_name: str,
                               args: ZoneVirtualNetworkLinkArgs,
                               opts: Optional[ResourceOptions] = None)
    func NewZoneVirtualNetworkLink(ctx *Context, name string, args ZoneVirtualNetworkLinkArgs, opts ...ResourceOption) (*ZoneVirtualNetworkLink, error)
    public ZoneVirtualNetworkLink(string name, ZoneVirtualNetworkLinkArgs args, CustomResourceOptions? opts = null)
    public ZoneVirtualNetworkLink(String name, ZoneVirtualNetworkLinkArgs args)
    public ZoneVirtualNetworkLink(String name, ZoneVirtualNetworkLinkArgs args, CustomResourceOptions options)
    
    type: azure:privatedns:ZoneVirtualNetworkLink
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ZoneVirtualNetworkLinkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ZoneVirtualNetworkLinkArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ZoneVirtualNetworkLinkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ZoneVirtualNetworkLinkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ZoneVirtualNetworkLinkArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ZoneVirtualNetworkLink Resource Properties

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

    Inputs

    The ZoneVirtualNetworkLink resource accepts the following input properties:

    PrivateDnsZoneName string
    The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
    ResourceGroupName string
    Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
    VirtualNetworkId string
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    Name string
    The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
    RegistrationEnabled bool
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    PrivateDnsZoneName string
    The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
    ResourceGroupName string
    Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
    VirtualNetworkId string
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    Name string
    The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
    RegistrationEnabled bool
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    privateDnsZoneName String
    The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
    resourceGroupName String
    Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
    virtualNetworkId String
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    name String
    The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
    registrationEnabled Boolean
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    privateDnsZoneName string
    The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
    resourceGroupName string
    Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
    virtualNetworkId string
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    name string
    The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
    registrationEnabled boolean
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    private_dns_zone_name str
    The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
    resource_group_name str
    Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
    virtual_network_id str
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    name str
    The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
    registration_enabled bool
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    privateDnsZoneName String
    The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
    resourceGroupName String
    Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
    virtualNetworkId String
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    name String
    The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
    registrationEnabled Boolean
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false.
    tags Map<String>
    A mapping of tags to assign to the resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ZoneVirtualNetworkLink Resource

    Get an existing ZoneVirtualNetworkLink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ZoneVirtualNetworkLinkState, opts?: CustomResourceOptions): ZoneVirtualNetworkLink
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            private_dns_zone_name: Optional[str] = None,
            registration_enabled: Optional[bool] = None,
            resource_group_name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            virtual_network_id: Optional[str] = None) -> ZoneVirtualNetworkLink
    func GetZoneVirtualNetworkLink(ctx *Context, name string, id IDInput, state *ZoneVirtualNetworkLinkState, opts ...ResourceOption) (*ZoneVirtualNetworkLink, error)
    public static ZoneVirtualNetworkLink Get(string name, Input<string> id, ZoneVirtualNetworkLinkState? state, CustomResourceOptions? opts = null)
    public static ZoneVirtualNetworkLink get(String name, Output<String> id, ZoneVirtualNetworkLinkState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Name string
    The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
    PrivateDnsZoneName string
    The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
    RegistrationEnabled bool
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false.
    ResourceGroupName string
    Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    VirtualNetworkId string
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    Name string
    The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
    PrivateDnsZoneName string
    The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
    RegistrationEnabled bool
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false.
    ResourceGroupName string
    Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    VirtualNetworkId string
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    name String
    The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
    privateDnsZoneName String
    The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
    registrationEnabled Boolean
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false.
    resourceGroupName String
    Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    virtualNetworkId String
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    name string
    The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
    privateDnsZoneName string
    The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
    registrationEnabled boolean
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false.
    resourceGroupName string
    Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    virtualNetworkId string
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    name str
    The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
    private_dns_zone_name str
    The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
    registration_enabled bool
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false.
    resource_group_name str
    Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    virtual_network_id str
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    name String
    The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
    privateDnsZoneName String
    The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
    registrationEnabled Boolean
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false.
    resourceGroupName String
    Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
    tags Map<String>
    A mapping of tags to assign to the resource.
    virtualNetworkId String
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.

    Import

    Private DNS Zone Virtual Network Links can be imported using the resource id, e.g.

    $ pulumi import azure:privatedns/zoneVirtualNetworkLink:ZoneVirtualNetworkLink link1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/privateDnsZones/zone1.com/virtualNetworkLinks/myVnetLink1
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.67.0 published on Wednesday, Feb 21, 2024 by Pulumi