We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:privatedns/getZoneVirtualNetworkLink:getZoneVirtualNetworkLink
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The name of the Private DNS Zone Virtual Network Link.
- Private
Dns stringZone Name - The name of the Private DNS zone (without a terminating dot).
- Resource
Group stringName - Specifies the resource group where the Private DNS Zone exists.
- Name string
- The name of the Private DNS Zone Virtual Network Link.
- Private
Dns stringZone Name - The name of the Private DNS zone (without a terminating dot).
- Resource
Group stringName - Specifies the resource group where the Private DNS Zone exists.
- name String
- The name of the Private DNS Zone Virtual Network Link.
- private
Dns StringZone Name - The name of the Private DNS zone (without a terminating dot).
- resource
Group StringName - Specifies the resource group where the Private DNS Zone exists.
- name string
- The name of the Private DNS Zone Virtual Network Link.
- private
Dns stringZone Name - The name of the Private DNS zone (without a terminating dot).
- resource
Group 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.
- private
Dns StringZone Name - The name of the Private DNS zone (without a terminating dot).
- resource
Group 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
- Private
Dns stringZone 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 stringName - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Virtual
Network 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
- Private
Dns stringZone 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 stringName - map[string]string
- A mapping of tags to assign to the resource.
- Virtual
Network 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
- private
Dns StringZone Name - registration
Enabled Boolean - Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
- resource
Group StringName - Map<String,String>
- A mapping of tags to assign to the resource.
- virtual
Network 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
- private
Dns stringZone Name - registration
Enabled boolean - Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
- resource
Group stringName - {[key: string]: string}
- A mapping of tags to assign to the resource.
- virtual
Network 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
- private
Dns StringZone Name - registration
Enabled Boolean - Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
- resource
Group StringName - Map<String>
- A mapping of tags to assign to the resource.
- virtual
Network 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
azurerm
Terraform Provider.