VNetPeering

class VNetPeering : KotlinCustomResource

Peerings in a VirtualNetwork resource Uses Azure REST API version 2024-05-01. Other available API versions: 2023-02-01, 2023-09-15-preview, 2024-09-01-preview, 2025-03-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native databricks [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create vNet Peering for Workspace

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var vNetPeering = new AzureNative.Databricks.VNetPeering("vNetPeering", new()
{
AllowForwardedTraffic = false,
AllowGatewayTransit = false,
AllowVirtualNetworkAccess = true,
PeeringName = "vNetPeeringTest",
RemoteVirtualNetwork = new AzureNative.Databricks.Inputs.VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetworkArgs
{
Id = "/subscriptions/0140911e-1040-48da-8bc9-b99fb3dd88a6/resourceGroups/subramantest/providers/Microsoft.Network/virtualNetworks/subramanvnet",
},
ResourceGroupName = "subramantest",
UseRemoteGateways = false,
WorkspaceName = "adbworkspace",
});
});
package main
import (
databricks "github.com/pulumi/pulumi-azure-native-sdk/databricks/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := databricks.NewVNetPeering(ctx, "vNetPeering", &databricks.VNetPeeringArgs{
AllowForwardedTraffic: pulumi.Bool(false),
AllowGatewayTransit: pulumi.Bool(false),
AllowVirtualNetworkAccess: pulumi.Bool(true),
PeeringName: pulumi.String("vNetPeeringTest"),
RemoteVirtualNetwork: &databricks.VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetworkArgs{
Id: pulumi.String("/subscriptions/0140911e-1040-48da-8bc9-b99fb3dd88a6/resourceGroups/subramantest/providers/Microsoft.Network/virtualNetworks/subramanvnet"),
},
ResourceGroupName: pulumi.String("subramantest"),
UseRemoteGateways: pulumi.Bool(false),
WorkspaceName: pulumi.String("adbworkspace"),
})
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.databricks.VNetPeering;
import com.pulumi.azurenative.databricks.VNetPeeringArgs;
import com.pulumi.azurenative.databricks.inputs.VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetworkArgs;
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 vNetPeering = new VNetPeering("vNetPeering", VNetPeeringArgs.builder()
.allowForwardedTraffic(false)
.allowGatewayTransit(false)
.allowVirtualNetworkAccess(true)
.peeringName("vNetPeeringTest")
.remoteVirtualNetwork(VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetworkArgs.builder()
.id("/subscriptions/0140911e-1040-48da-8bc9-b99fb3dd88a6/resourceGroups/subramantest/providers/Microsoft.Network/virtualNetworks/subramanvnet")
.build())
.resourceGroupName("subramantest")
.useRemoteGateways(false)
.workspaceName("adbworkspace")
.build());
}
}

Import

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

$ pulumi import azure-native:databricks:VNetPeering vNetPeeringTest /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}

Properties

Link copied to clipboard

Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.

Link copied to clipboard

If gateway links can be used in remote virtual networking to link to this virtual network.

Link copied to clipboard

Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard

The reference to the databricks virtual network address space.

Link copied to clipboard

The remote virtual network should be in the same region. See here to learn more (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering).

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

Name of the virtual network peering resource

Link copied to clipboard
val peeringState: Output<String>

The status of the virtual network peering.

Link copied to clipboard

The provisioning state of the virtual network peering resource.

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

The reference to the remote virtual network address space.

Link copied to clipboard

The remote virtual network should be in the same region. See here to learn more (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering).

Link copied to clipboard
val type: Output<String>

type of the virtual network peering resource

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

If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.