VirtualNetworkPeeringArgs

data class VirtualNetworkPeeringArgs(val allowForwardedTraffic: Output<Boolean>? = null, val allowGatewayTransit: Output<Boolean>? = null, val allowVirtualNetworkAccess: Output<Boolean>? = null, val name: Output<String>? = null, val remoteAddressSpacePrefixes: Output<List<String>>? = null, val remoteVirtualNetworkId: Output<String>? = null, val resourceGroupName: Output<String>? = null, val useRemoteGateways: Output<Boolean>? = null, val workspaceId: Output<String>? = null) : ConvertibleToJava<VirtualNetworkPeeringArgs>

Manages a Databricks Virtual Network Peering

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const remote = new azure.network.VirtualNetwork("remote", {
name: "remote-vnet",
resourceGroupName: example.name,
addressSpaces: ["10&#46;0&#46;1&#46;0/24"],
location: example.location,
});
const exampleWorkspace = new azure.databricks.Workspace("example", {
name: "example-workspace",
resourceGroupName: example.name,
location: example.location,
sku: "standard",
});
const exampleVirtualNetworkPeering = new azure.databricks.VirtualNetworkPeering("example", {
name: "databricks-vnet-peer",
resourceGroupName: example.name,
workspaceId: exampleWorkspace.id,
remoteAddressSpacePrefixes: remote.addressSpaces,
remoteVirtualNetworkId: remote.id,
allowVirtualNetworkAccess: true,
});
const remoteVirtualNetworkPeering = new azure.network.VirtualNetworkPeering("remote", {
name: "peer-to-databricks",
resourceGroupName: example.name,
virtualNetworkName: remote.name,
remoteVirtualNetworkId: exampleVirtualNetworkPeering.virtualNetworkId,
allowVirtualNetworkAccess: true,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
remote = azure.network.VirtualNetwork("remote",
name="remote-vnet",
resource_group_name=example.name,
address_spaces=["10&#46;0&#46;1&#46;0/24"],
location=example.location)
example_workspace = azure.databricks.Workspace("example",
name="example-workspace",
resource_group_name=example.name,
location=example.location,
sku="standard")
example_virtual_network_peering = azure.databricks.VirtualNetworkPeering("example",
name="databricks-vnet-peer",
resource_group_name=example.name,
workspace_id=example_workspace.id,
remote_address_space_prefixes=remote.address_spaces,
remote_virtual_network_id=remote.id,
allow_virtual_network_access=True)
remote_virtual_network_peering = azure.network.VirtualNetworkPeering("remote",
name="peer-to-databricks",
resource_group_name=example.name,
virtual_network_name=remote.name,
remote_virtual_network_id=example_virtual_network_peering.virtual_network_id,
allow_virtual_network_access=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var remote = new Azure.Network.VirtualNetwork("remote", new()
{
Name = "remote-vnet",
ResourceGroupName = example.Name,
AddressSpaces = new[]
{
"10.0.1.0/24",
},
Location = example.Location,
});
var exampleWorkspace = new Azure.DataBricks.Workspace("example", new()
{
Name = "example-workspace",
ResourceGroupName = example.Name,
Location = example.Location,
Sku = "standard",
});
var exampleVirtualNetworkPeering = new Azure.DataBricks.VirtualNetworkPeering("example", new()
{
Name = "databricks-vnet-peer",
ResourceGroupName = example.Name,
WorkspaceId = exampleWorkspace.Id,
RemoteAddressSpacePrefixes = remote.AddressSpaces,
RemoteVirtualNetworkId = remote.Id,
AllowVirtualNetworkAccess = true,
});
var remoteVirtualNetworkPeering = new Azure.Network.VirtualNetworkPeering("remote", new()
{
Name = "peer-to-databricks",
ResourceGroupName = example.Name,
VirtualNetworkName = remote.Name,
RemoteVirtualNetworkId = exampleVirtualNetworkPeering.VirtualNetworkId,
AllowVirtualNetworkAccess = true,
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/databricks"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
remote, err := network.NewVirtualNetwork(ctx, "remote", &network.VirtualNetworkArgs{
Name: pulumi.String("remote-vnet"),
ResourceGroupName: example.Name,
AddressSpaces: pulumi.StringArray{
pulumi.String("10.0.1.0/24"),
},
Location: example.Location,
})
if err != nil {
return err
}
exampleWorkspace, err := databricks.NewWorkspace(ctx, "example", &databricks.WorkspaceArgs{
Name: pulumi.String("example-workspace"),
ResourceGroupName: example.Name,
Location: example.Location,
Sku: pulumi.String("standard"),
})
if err != nil {
return err
}
exampleVirtualNetworkPeering, err := databricks.NewVirtualNetworkPeering(ctx, "example", &databricks.VirtualNetworkPeeringArgs{
Name: pulumi.String("databricks-vnet-peer"),
ResourceGroupName: example.Name,
WorkspaceId: exampleWorkspace.ID(),
RemoteAddressSpacePrefixes: remote.AddressSpaces,
RemoteVirtualNetworkId: remote.ID(),
AllowVirtualNetworkAccess: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = network.NewVirtualNetworkPeering(ctx, "remote", &network.VirtualNetworkPeeringArgs{
Name: pulumi.String("peer-to-databricks"),
ResourceGroupName: example.Name,
VirtualNetworkName: remote.Name,
RemoteVirtualNetworkId: exampleVirtualNetworkPeering.VirtualNetworkId,
AllowVirtualNetworkAccess: pulumi.Bool(true),
})
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.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.databricks.Workspace;
import com.pulumi.azure.databricks.WorkspaceArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var remote = new VirtualNetwork("remote", VirtualNetworkArgs.builder()
.name("remote-vnet")
.resourceGroupName(example.name())
.addressSpaces("10.0.1.0/24")
.location(example.location())
.build());
var exampleWorkspace = new Workspace("exampleWorkspace", WorkspaceArgs.builder()
.name("example-workspace")
.resourceGroupName(example.name())
.location(example.location())
.sku("standard")
.build());
var exampleVirtualNetworkPeering = new com.pulumi.azure.databricks.VirtualNetworkPeering("exampleVirtualNetworkPeering", com.pulumi.azure.databricks.VirtualNetworkPeeringArgs.builder()
.name("databricks-vnet-peer")
.resourceGroupName(example.name())
.workspaceId(exampleWorkspace.id())
.remoteAddressSpacePrefixes(remote.addressSpaces())
.remoteVirtualNetworkId(remote.id())
.allowVirtualNetworkAccess(true)
.build());
var remoteVirtualNetworkPeering = new com.pulumi.azure.network.VirtualNetworkPeering("remoteVirtualNetworkPeering", com.pulumi.azure.network.VirtualNetworkPeeringArgs.builder()
.name("peer-to-databricks")
.resourceGroupName(example.name())
.virtualNetworkName(remote.name())
.remoteVirtualNetworkId(exampleVirtualNetworkPeering.virtualNetworkId())
.allowVirtualNetworkAccess(true)
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
remote:
type: azure:network:VirtualNetwork
properties:
name: remote-vnet
resourceGroupName: ${example.name}
addressSpaces:
- 10.0.1.0/24
location: ${example.location}
exampleWorkspace:
type: azure:databricks:Workspace
name: example
properties:
name: example-workspace
resourceGroupName: ${example.name}
location: ${example.location}
sku: standard
exampleVirtualNetworkPeering:
type: azure:databricks:VirtualNetworkPeering
name: example
properties:
name: databricks-vnet-peer
resourceGroupName: ${example.name}
workspaceId: ${exampleWorkspace.id}
remoteAddressSpacePrefixes: ${remote.addressSpaces}
remoteVirtualNetworkId: ${remote.id}
allowVirtualNetworkAccess: true
remoteVirtualNetworkPeering:
type: azure:network:VirtualNetworkPeering
name: remote
properties:
name: peer-to-databricks
resourceGroupName: ${example.name}
virtualNetworkName: ${remote.name}
remoteVirtualNetworkId: ${exampleVirtualNetworkPeering.virtualNetworkId}
allowVirtualNetworkAccess: true

Import

Databrick Virtual Network Peerings can be imported using the resource id, e.g.

$ pulumi import azure:databricks/virtualNetworkPeering:VirtualNetworkPeering example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Databricks/workspaces/workspace1/virtualNetworkPeerings/peering1

Constructors

Link copied to clipboard
constructor(allowForwardedTraffic: Output<Boolean>? = null, allowGatewayTransit: Output<Boolean>? = null, allowVirtualNetworkAccess: Output<Boolean>? = null, name: Output<String>? = null, remoteAddressSpacePrefixes: Output<List<String>>? = null, remoteVirtualNetworkId: Output<String>? = null, resourceGroupName: Output<String>? = null, useRemoteGateways: Output<Boolean>? = null, workspaceId: Output<String>? = null)

Properties

Link copied to clipboard
val allowForwardedTraffic: Output<Boolean>? = null

Can the forwarded traffic from the VMs in the local virtual network be forwarded to the remote virtual network? Defaults to false.

Link copied to clipboard
val allowGatewayTransit: Output<Boolean>? = null

Can the gateway links be used in the remote virtual network to link to the Databricks virtual network? Defaults to false.

Link copied to clipboard
val allowVirtualNetworkAccess: Output<Boolean>? = null

Can the VMs in the local virtual network space access the VMs in the remote virtual network space? Defaults to true.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the Databricks Virtual Network Peering resource. Changing this forces a new resource to be created.

Link copied to clipboard
val remoteAddressSpacePrefixes: Output<List<String>>? = null

A list of address blocks reserved for the remote virtual network in CIDR notation. Changing this forces a new resource to be created.

Link copied to clipboard
val remoteVirtualNetworkId: Output<String>? = null

The ID of the remote virtual network. Changing this forces a new resource to be created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the Resource Group in which the Databricks Virtual Network Peering should exist. Changing this forces a new resource to be created.

Link copied to clipboard
val useRemoteGateways: Output<Boolean>? = null

Can remote gateways be used on the Databricks virtual network? Defaults to false.

Link copied to clipboard
val workspaceId: Output<String>? = null

The ID of the Databricks Workspace that this Databricks Virtual Network Peering is bound. Changing this forces a new resource to be created.

Functions

Link copied to clipboard
open override fun toJava(): VirtualNetworkPeeringArgs