VirtualNetworkLink

class VirtualNetworkLink : KotlinCustomResource

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/#accessing-any-api-version-via-local-packages for details.

Example Usage

PUT Private DNS Zone Virtual Network Link

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",
});
});
package main
import (
privatedns "github.com/pulumi/pulumi-azure-native-sdk/privatedns/v2"
"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
})
}
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());
}
}

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}

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard
val etag: Output<String>?

The ETag of the virtual network link.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val location: Output<String>?

The Azure Region where the resource lives

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard

The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?

Link copied to clipboard
val resolutionPolicy: Output<String>?

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.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Resource tags.

Link copied to clipboard
val type: Output<String>

The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

The reference of the virtual network.

Link copied to clipboard

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.