databricks.MwsNetworks
Explore with Pulumi AI
Example Usage
Creating a Databricks on GCP workspace
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
import * as google from "@pulumi/google";
const config = new pulumi.Config();
// Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
const databricksAccountId = config.requireObject("databricksAccountId");
const dbxPrivateVpc = new google.index.ComputeNetwork("dbx_private_vpc", {
    project: googleProject,
    name: `tf-network-${suffix.result}`,
    autoCreateSubnetworks: false,
});
const network_with_private_secondary_ip_ranges = new google.index.ComputeSubnetwork("network-with-private-secondary-ip-ranges", {
    name: `test-dbx-${suffix.result}`,
    ipCidrRange: "10.0.0.0/16",
    region: "us-central1",
    network: dbxPrivateVpc.id,
    secondaryIpRange: [
        {
            rangeName: "pods",
            ipCidrRange: "10.1.0.0/16",
        },
        {
            rangeName: "svc",
            ipCidrRange: "10.2.0.0/20",
        },
    ],
    privateIpGoogleAccess: true,
});
const router = new google.index.ComputeRouter("router", {
    name: `my-router-${suffix.result}`,
    region: network_with_private_secondary_ip_ranges.region,
    network: dbxPrivateVpc.id,
});
const nat = new google.index.ComputeRouterNat("nat", {
    name: `my-router-nat-${suffix.result}`,
    router: router.name,
    region: router.region,
    natIpAllocateOption: "AUTO_ONLY",
    sourceSubnetworkIpRangesToNat: "ALL_SUBNETWORKS_ALL_IP_RANGES",
});
const _this = new databricks.MwsNetworks("this", {
    accountId: databricksAccountId,
    networkName: `test-demo-${suffix.result}`,
    gcpNetworkInfo: {
        networkProjectId: googleProject,
        vpcId: dbxPrivateVpc.name,
        subnetId: networkWithPrivateSecondaryIpRanges.name,
        subnetRegion: networkWithPrivateSecondaryIpRanges.region,
        podIpRangeName: "pods",
        serviceIpRangeName: "svc",
    },
});
import pulumi
import pulumi_databricks as databricks
import pulumi_google as google
config = pulumi.Config()
# Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
databricks_account_id = config.require_object("databricksAccountId")
dbx_private_vpc = google.index.ComputeNetwork("dbx_private_vpc",
    project=google_project,
    name=ftf-network-{suffix.result},
    auto_create_subnetworks=False)
network_with_private_secondary_ip_ranges = google.index.ComputeSubnetwork("network-with-private-secondary-ip-ranges",
    name=ftest-dbx-{suffix.result},
    ip_cidr_range=10.0.0.0/16,
    region=us-central1,
    network=dbx_private_vpc.id,
    secondary_ip_range=[
        {
            rangeName: pods,
            ipCidrRange: 10.1.0.0/16,
        },
        {
            rangeName: svc,
            ipCidrRange: 10.2.0.0/20,
        },
    ],
    private_ip_google_access=True)
router = google.index.ComputeRouter("router",
    name=fmy-router-{suffix.result},
    region=network_with_private_secondary_ip_ranges.region,
    network=dbx_private_vpc.id)
nat = google.index.ComputeRouterNat("nat",
    name=fmy-router-nat-{suffix.result},
    router=router.name,
    region=router.region,
    nat_ip_allocate_option=AUTO_ONLY,
    source_subnetwork_ip_ranges_to_nat=ALL_SUBNETWORKS_ALL_IP_RANGES)
this = databricks.MwsNetworks("this",
    account_id=databricks_account_id,
    network_name=f"test-demo-{suffix['result']}",
    gcp_network_info={
        "network_project_id": google_project,
        "vpc_id": dbx_private_vpc["name"],
        "subnet_id": network_with_private_secondary_ip_ranges["name"],
        "subnet_region": network_with_private_secondary_ip_ranges["region"],
        "pod_ip_range_name": "pods",
        "service_ip_range_name": "svc",
    })
package main
import (
	"fmt"
	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
	"github.com/pulumi/pulumi-google/sdk/go/google"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		// Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
		databricksAccountId := cfg.RequireObject("databricksAccountId")
		dbxPrivateVpc, err := google.NewComputeNetwork(ctx, "dbx_private_vpc", &google.ComputeNetworkArgs{
			Project:               googleProject,
			Name:                  fmt.Sprintf("tf-network-%v", suffix.Result),
			AutoCreateSubnetworks: false,
		})
		if err != nil {
			return err
		}
		network_with_private_secondary_ip_ranges, err := google.NewComputeSubnetwork(ctx, "network-with-private-secondary-ip-ranges", &google.ComputeSubnetworkArgs{
			Name:        fmt.Sprintf("test-dbx-%v", suffix.Result),
			IpCidrRange: "10.0.0.0/16",
			Region:      "us-central1",
			Network:     dbxPrivateVpc.Id,
			SecondaryIpRange: []map[string]interface{}{
				map[string]interface{}{
					"rangeName":   "pods",
					"ipCidrRange": "10.1.0.0/16",
				},
				map[string]interface{}{
					"rangeName":   "svc",
					"ipCidrRange": "10.2.0.0/20",
				},
			},
			PrivateIpGoogleAccess: true,
		})
		if err != nil {
			return err
		}
		router, err := google.NewComputeRouter(ctx, "router", &google.ComputeRouterArgs{
			Name:    fmt.Sprintf("my-router-%v", suffix.Result),
			Region:  network_with_private_secondary_ip_ranges.Region,
			Network: dbxPrivateVpc.Id,
		})
		if err != nil {
			return err
		}
		_, err = google.NewComputeRouterNat(ctx, "nat", &google.ComputeRouterNatArgs{
			Name:                          fmt.Sprintf("my-router-nat-%v", suffix.Result),
			Router:                        router.Name,
			Region:                        router.Region,
			NatIpAllocateOption:           "AUTO_ONLY",
			SourceSubnetworkIpRangesToNat: "ALL_SUBNETWORKS_ALL_IP_RANGES",
		})
		if err != nil {
			return err
		}
		_, err = databricks.NewMwsNetworks(ctx, "this", &databricks.MwsNetworksArgs{
			AccountId:   pulumi.Any(databricksAccountId),
			NetworkName: pulumi.Sprintf("test-demo-%v", suffix.Result),
			GcpNetworkInfo: &databricks.MwsNetworksGcpNetworkInfoArgs{
				NetworkProjectId:   pulumi.Any(googleProject),
				VpcId:              dbxPrivateVpc.Name,
				SubnetId:           pulumi.Any(networkWithPrivateSecondaryIpRanges.Name),
				SubnetRegion:       pulumi.Any(networkWithPrivateSecondaryIpRanges.Region),
				PodIpRangeName:     pulumi.String("pods"),
				ServiceIpRangeName: pulumi.String("svc"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
using Google = Pulumi.Google;
return await Deployment.RunAsync(() => 
{
    var config = new Config();
    // Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
    var databricksAccountId = config.RequireObject<dynamic>("databricksAccountId");
    var dbxPrivateVpc = new Google.Index.ComputeNetwork("dbx_private_vpc", new()
    {
        Project = googleProject,
        Name = $"tf-network-{suffix.Result}",
        AutoCreateSubnetworks = false,
    });
    var network_with_private_secondary_ip_ranges = new Google.Index.ComputeSubnetwork("network-with-private-secondary-ip-ranges", new()
    {
        Name = $"test-dbx-{suffix.Result}",
        IpCidrRange = "10.0.0.0/16",
        Region = "us-central1",
        Network = dbxPrivateVpc.Id,
        SecondaryIpRange = new[]
        {
            
            {
                { "rangeName", "pods" },
                { "ipCidrRange", "10.1.0.0/16" },
            },
            
            {
                { "rangeName", "svc" },
                { "ipCidrRange", "10.2.0.0/20" },
            },
        },
        PrivateIpGoogleAccess = true,
    });
    var router = new Google.Index.ComputeRouter("router", new()
    {
        Name = $"my-router-{suffix.Result}",
        Region = network_with_private_secondary_ip_ranges.Region,
        Network = dbxPrivateVpc.Id,
    });
    var nat = new Google.Index.ComputeRouterNat("nat", new()
    {
        Name = $"my-router-nat-{suffix.Result}",
        Router = router.Name,
        Region = router.Region,
        NatIpAllocateOption = "AUTO_ONLY",
        SourceSubnetworkIpRangesToNat = "ALL_SUBNETWORKS_ALL_IP_RANGES",
    });
    var @this = new Databricks.MwsNetworks("this", new()
    {
        AccountId = databricksAccountId,
        NetworkName = $"test-demo-{suffix.Result}",
        GcpNetworkInfo = new Databricks.Inputs.MwsNetworksGcpNetworkInfoArgs
        {
            NetworkProjectId = googleProject,
            VpcId = dbxPrivateVpc.Name,
            SubnetId = networkWithPrivateSecondaryIpRanges.Name,
            SubnetRegion = networkWithPrivateSecondaryIpRanges.Region,
            PodIpRangeName = "pods",
            ServiceIpRangeName = "svc",
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.google.computeNetwork;
import com.pulumi.google.ComputeNetworkArgs;
import com.pulumi.google.computeSubnetwork;
import com.pulumi.google.ComputeSubnetworkArgs;
import com.pulumi.google.computeRouter;
import com.pulumi.google.ComputeRouterArgs;
import com.pulumi.google.computeRouterNat;
import com.pulumi.google.ComputeRouterNatArgs;
import com.pulumi.databricks.MwsNetworks;
import com.pulumi.databricks.MwsNetworksArgs;
import com.pulumi.databricks.inputs.MwsNetworksGcpNetworkInfoArgs;
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 config = ctx.config();
        final var databricksAccountId = config.get("databricksAccountId");
        var dbxPrivateVpc = new ComputeNetwork("dbxPrivateVpc", ComputeNetworkArgs.builder()
            .project(googleProject)
            .name(String.format("tf-network-%s", suffix.result()))
            .autoCreateSubnetworks(false)
            .build());
        var network_with_private_secondary_ip_ranges = new ComputeSubnetwork("network-with-private-secondary-ip-ranges", ComputeSubnetworkArgs.builder()
            .name(String.format("test-dbx-%s", suffix.result()))
            .ipCidrRange("10.0.0.0/16")
            .region("us-central1")
            .network(dbxPrivateVpc.id())
            .secondaryIpRange(            
                %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
                %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
            .privateIpGoogleAccess(true)
            .build());
        var router = new ComputeRouter("router", ComputeRouterArgs.builder()
            .name(String.format("my-router-%s", suffix.result()))
            .region(network_with_private_secondary_ip_ranges.region())
            .network(dbxPrivateVpc.id())
            .build());
        var nat = new ComputeRouterNat("nat", ComputeRouterNatArgs.builder()
            .name(String.format("my-router-nat-%s", suffix.result()))
            .router(router.name())
            .region(router.region())
            .natIpAllocateOption("AUTO_ONLY")
            .sourceSubnetworkIpRangesToNat("ALL_SUBNETWORKS_ALL_IP_RANGES")
            .build());
        var this_ = new MwsNetworks("this", MwsNetworksArgs.builder()
            .accountId(databricksAccountId)
            .networkName(String.format("test-demo-%s", suffix.result()))
            .gcpNetworkInfo(MwsNetworksGcpNetworkInfoArgs.builder()
                .networkProjectId(googleProject)
                .vpcId(dbxPrivateVpc.name())
                .subnetId(networkWithPrivateSecondaryIpRanges.name())
                .subnetRegion(networkWithPrivateSecondaryIpRanges.region())
                .podIpRangeName("pods")
                .serviceIpRangeName("svc")
                .build())
            .build());
    }
}
configuration:
  databricksAccountId:
    type: dynamic
resources:
  dbxPrivateVpc:
    type: google:computeNetwork
    name: dbx_private_vpc
    properties:
      project: ${googleProject}
      name: tf-network-${suffix.result}
      autoCreateSubnetworks: false
  network-with-private-secondary-ip-ranges:
    type: google:computeSubnetwork
    properties:
      name: test-dbx-${suffix.result}
      ipCidrRange: 10.0.0.0/16
      region: us-central1
      network: ${dbxPrivateVpc.id}
      secondaryIpRange:
        - rangeName: pods
          ipCidrRange: 10.1.0.0/16
        - rangeName: svc
          ipCidrRange: 10.2.0.0/20
      privateIpGoogleAccess: true
  router:
    type: google:computeRouter
    properties:
      name: my-router-${suffix.result}
      region: ${["network-with-private-secondary-ip-ranges"].region}
      network: ${dbxPrivateVpc.id}
  nat:
    type: google:computeRouterNat
    properties:
      name: my-router-nat-${suffix.result}
      router: ${router.name}
      region: ${router.region}
      natIpAllocateOption: AUTO_ONLY
      sourceSubnetworkIpRangesToNat: ALL_SUBNETWORKS_ALL_IP_RANGES
  this:
    type: databricks:MwsNetworks
    properties:
      accountId: ${databricksAccountId}
      networkName: test-demo-${suffix.result}
      gcpNetworkInfo:
        networkProjectId: ${googleProject}
        vpcId: ${dbxPrivateVpc.name}
        subnetId: ${networkWithPrivateSecondaryIpRanges.name}
        subnetRegion: ${networkWithPrivateSecondaryIpRanges.region}
        podIpRangeName: pods
        serviceIpRangeName: svc
In order to create a VPC that leverages GCP Private Service Connect you would need to add the vpc_endpoint_id Attributes from mws_vpc_endpoint resources into the databricks.MwsNetworks resource. For example:
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const _this = new databricks.MwsNetworks("this", {
    accountId: databricksAccountId,
    networkName: `test-demo-${suffix.result}`,
    gcpNetworkInfo: {
        networkProjectId: googleProject,
        vpcId: dbxPrivateVpc.name,
        subnetId: networkWithPrivateSecondaryIpRanges.name,
        subnetRegion: networkWithPrivateSecondaryIpRanges.region,
        podIpRangeName: "pods",
        serviceIpRangeName: "svc",
    },
    vpcEndpoints: {
        dataplaneRelays: [relay.vpcEndpointId],
        restApis: [workspace.vpcEndpointId],
    },
});
import pulumi
import pulumi_databricks as databricks
this = databricks.MwsNetworks("this",
    account_id=databricks_account_id,
    network_name=f"test-demo-{suffix['result']}",
    gcp_network_info={
        "network_project_id": google_project,
        "vpc_id": dbx_private_vpc["name"],
        "subnet_id": network_with_private_secondary_ip_ranges["name"],
        "subnet_region": network_with_private_secondary_ip_ranges["region"],
        "pod_ip_range_name": "pods",
        "service_ip_range_name": "svc",
    },
    vpc_endpoints={
        "dataplane_relays": [relay["vpcEndpointId"]],
        "rest_apis": [workspace["vpcEndpointId"]],
    })
package main
import (
	"fmt"
	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := databricks.NewMwsNetworks(ctx, "this", &databricks.MwsNetworksArgs{
			AccountId:   pulumi.Any(databricksAccountId),
			NetworkName: pulumi.Sprintf("test-demo-%v", suffix.Result),
			GcpNetworkInfo: &databricks.MwsNetworksGcpNetworkInfoArgs{
				NetworkProjectId:   pulumi.Any(googleProject),
				VpcId:              pulumi.Any(dbxPrivateVpc.Name),
				SubnetId:           pulumi.Any(networkWithPrivateSecondaryIpRanges.Name),
				SubnetRegion:       pulumi.Any(networkWithPrivateSecondaryIpRanges.Region),
				PodIpRangeName:     pulumi.String("pods"),
				ServiceIpRangeName: pulumi.String("svc"),
			},
			VpcEndpoints: &databricks.MwsNetworksVpcEndpointsArgs{
				DataplaneRelays: pulumi.StringArray{
					relay.VpcEndpointId,
				},
				RestApis: pulumi.StringArray{
					workspace.VpcEndpointId,
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() => 
{
    var @this = new Databricks.MwsNetworks("this", new()
    {
        AccountId = databricksAccountId,
        NetworkName = $"test-demo-{suffix.Result}",
        GcpNetworkInfo = new Databricks.Inputs.MwsNetworksGcpNetworkInfoArgs
        {
            NetworkProjectId = googleProject,
            VpcId = dbxPrivateVpc.Name,
            SubnetId = networkWithPrivateSecondaryIpRanges.Name,
            SubnetRegion = networkWithPrivateSecondaryIpRanges.Region,
            PodIpRangeName = "pods",
            ServiceIpRangeName = "svc",
        },
        VpcEndpoints = new Databricks.Inputs.MwsNetworksVpcEndpointsArgs
        {
            DataplaneRelays = new[]
            {
                relay.VpcEndpointId,
            },
            RestApis = new[]
            {
                workspace.VpcEndpointId,
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.MwsNetworks;
import com.pulumi.databricks.MwsNetworksArgs;
import com.pulumi.databricks.inputs.MwsNetworksGcpNetworkInfoArgs;
import com.pulumi.databricks.inputs.MwsNetworksVpcEndpointsArgs;
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 this_ = new MwsNetworks("this", MwsNetworksArgs.builder()
            .accountId(databricksAccountId)
            .networkName(String.format("test-demo-%s", suffix.result()))
            .gcpNetworkInfo(MwsNetworksGcpNetworkInfoArgs.builder()
                .networkProjectId(googleProject)
                .vpcId(dbxPrivateVpc.name())
                .subnetId(networkWithPrivateSecondaryIpRanges.name())
                .subnetRegion(networkWithPrivateSecondaryIpRanges.region())
                .podIpRangeName("pods")
                .serviceIpRangeName("svc")
                .build())
            .vpcEndpoints(MwsNetworksVpcEndpointsArgs.builder()
                .dataplaneRelays(relay.vpcEndpointId())
                .restApis(workspace.vpcEndpointId())
                .build())
            .build());
    }
}
resources:
  this:
    type: databricks:MwsNetworks
    properties:
      accountId: ${databricksAccountId}
      networkName: test-demo-${suffix.result}
      gcpNetworkInfo:
        networkProjectId: ${googleProject}
        vpcId: ${dbxPrivateVpc.name}
        subnetId: ${networkWithPrivateSecondaryIpRanges.name}
        subnetRegion: ${networkWithPrivateSecondaryIpRanges.region}
        podIpRangeName: pods
        serviceIpRangeName: svc
      vpcEndpoints:
        dataplaneRelays:
          - ${relay.vpcEndpointId}
        restApis:
          - ${workspace.vpcEndpointId}
Modifying networks on running workspaces (AWS only)
Due to specifics of platform APIs, changing any attribute of network configuration would cause databricks.MwsNetworks to be re-created - deleted & added again with special case for running workspaces. Once network configuration is attached to a running databricks_mws_workspaces, you cannot delete it and pulumi up would result in INVALID_STATE: Unable to delete, Network is being used by active workspace X error. In order to modify any attributes of a network, you have to perform three different pulumi up steps:
- Create a new databricks.MwsNetworksresource.
- Update the databricks.MwsWorkspacesto point to the newnetwork_id.
- Delete the old databricks.MwsNetworksresource.
Related Resources
The following resources are used in the same context:
- Provisioning Databricks on AWS guide.
- Provisioning Databricks on AWS with Private Link guide.
- Provisioning AWS Databricks workspaces with a Hub & Spoke firewall for data exfiltration protection guide.
- Provisioning Databricks on GCP guide.
- Provisioning Databricks workspaces on GCP with Private Service Connect guide.
- databricks.MwsVpcEndpoint to register aws_vpc_endpoint resources with Databricks such that they can be used as part of a databricks.MwsNetworks configuration.
- databricks.MwsPrivateAccessSettings to create a Private Access Setting that can be used as part of a databricks.MwsWorkspaces resource to create a Databricks Workspace that leverages AWS PrivateLink or GCP Private Service Connect.
- databricks.MwsWorkspaces to set up AWS and GCP workspaces.
Create MwsNetworks Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MwsNetworks(name: string, args: MwsNetworksArgs, opts?: CustomResourceOptions);@overload
def MwsNetworks(resource_name: str,
                args: MwsNetworksArgs,
                opts: Optional[ResourceOptions] = None)
@overload
def MwsNetworks(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                account_id: Optional[str] = None,
                network_name: Optional[str] = None,
                creation_time: Optional[int] = None,
                error_messages: Optional[Sequence[MwsNetworksErrorMessageArgs]] = None,
                gcp_network_info: Optional[MwsNetworksGcpNetworkInfoArgs] = None,
                network_id: Optional[str] = None,
                security_group_ids: Optional[Sequence[str]] = None,
                subnet_ids: Optional[Sequence[str]] = None,
                vpc_endpoints: Optional[MwsNetworksVpcEndpointsArgs] = None,
                vpc_id: Optional[str] = None,
                vpc_status: Optional[str] = None,
                workspace_id: Optional[str] = None)func NewMwsNetworks(ctx *Context, name string, args MwsNetworksArgs, opts ...ResourceOption) (*MwsNetworks, error)public MwsNetworks(string name, MwsNetworksArgs args, CustomResourceOptions? opts = null)
public MwsNetworks(String name, MwsNetworksArgs args)
public MwsNetworks(String name, MwsNetworksArgs args, CustomResourceOptions options)
type: databricks:MwsNetworks
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args MwsNetworksArgs
- 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 MwsNetworksArgs
- 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 MwsNetworksArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MwsNetworksArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MwsNetworksArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var mwsNetworksResource = new Databricks.MwsNetworks("mwsNetworksResource", new()
{
    AccountId = "string",
    NetworkName = "string",
    CreationTime = 0,
    ErrorMessages = new[]
    {
        new Databricks.Inputs.MwsNetworksErrorMessageArgs
        {
            ErrorMessage = "string",
            ErrorType = "string",
        },
    },
    GcpNetworkInfo = new Databricks.Inputs.MwsNetworksGcpNetworkInfoArgs
    {
        NetworkProjectId = "string",
        PodIpRangeName = "string",
        ServiceIpRangeName = "string",
        SubnetId = "string",
        SubnetRegion = "string",
        VpcId = "string",
    },
    NetworkId = "string",
    SecurityGroupIds = new[]
    {
        "string",
    },
    SubnetIds = new[]
    {
        "string",
    },
    VpcEndpoints = new Databricks.Inputs.MwsNetworksVpcEndpointsArgs
    {
        DataplaneRelays = new[]
        {
            "string",
        },
        RestApis = new[]
        {
            "string",
        },
    },
    VpcId = "string",
    VpcStatus = "string",
    WorkspaceId = "string",
});
example, err := databricks.NewMwsNetworks(ctx, "mwsNetworksResource", &databricks.MwsNetworksArgs{
	AccountId:    pulumi.String("string"),
	NetworkName:  pulumi.String("string"),
	CreationTime: pulumi.Int(0),
	ErrorMessages: databricks.MwsNetworksErrorMessageArray{
		&databricks.MwsNetworksErrorMessageArgs{
			ErrorMessage: pulumi.String("string"),
			ErrorType:    pulumi.String("string"),
		},
	},
	GcpNetworkInfo: &databricks.MwsNetworksGcpNetworkInfoArgs{
		NetworkProjectId:   pulumi.String("string"),
		PodIpRangeName:     pulumi.String("string"),
		ServiceIpRangeName: pulumi.String("string"),
		SubnetId:           pulumi.String("string"),
		SubnetRegion:       pulumi.String("string"),
		VpcId:              pulumi.String("string"),
	},
	NetworkId: pulumi.String("string"),
	SecurityGroupIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	SubnetIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	VpcEndpoints: &databricks.MwsNetworksVpcEndpointsArgs{
		DataplaneRelays: pulumi.StringArray{
			pulumi.String("string"),
		},
		RestApis: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	VpcId:       pulumi.String("string"),
	VpcStatus:   pulumi.String("string"),
	WorkspaceId: pulumi.String("string"),
})
var mwsNetworksResource = new MwsNetworks("mwsNetworksResource", MwsNetworksArgs.builder()
    .accountId("string")
    .networkName("string")
    .creationTime(0)
    .errorMessages(MwsNetworksErrorMessageArgs.builder()
        .errorMessage("string")
        .errorType("string")
        .build())
    .gcpNetworkInfo(MwsNetworksGcpNetworkInfoArgs.builder()
        .networkProjectId("string")
        .podIpRangeName("string")
        .serviceIpRangeName("string")
        .subnetId("string")
        .subnetRegion("string")
        .vpcId("string")
        .build())
    .networkId("string")
    .securityGroupIds("string")
    .subnetIds("string")
    .vpcEndpoints(MwsNetworksVpcEndpointsArgs.builder()
        .dataplaneRelays("string")
        .restApis("string")
        .build())
    .vpcId("string")
    .vpcStatus("string")
    .workspaceId("string")
    .build());
mws_networks_resource = databricks.MwsNetworks("mwsNetworksResource",
    account_id="string",
    network_name="string",
    creation_time=0,
    error_messages=[{
        "error_message": "string",
        "error_type": "string",
    }],
    gcp_network_info={
        "network_project_id": "string",
        "pod_ip_range_name": "string",
        "service_ip_range_name": "string",
        "subnet_id": "string",
        "subnet_region": "string",
        "vpc_id": "string",
    },
    network_id="string",
    security_group_ids=["string"],
    subnet_ids=["string"],
    vpc_endpoints={
        "dataplane_relays": ["string"],
        "rest_apis": ["string"],
    },
    vpc_id="string",
    vpc_status="string",
    workspace_id="string")
const mwsNetworksResource = new databricks.MwsNetworks("mwsNetworksResource", {
    accountId: "string",
    networkName: "string",
    creationTime: 0,
    errorMessages: [{
        errorMessage: "string",
        errorType: "string",
    }],
    gcpNetworkInfo: {
        networkProjectId: "string",
        podIpRangeName: "string",
        serviceIpRangeName: "string",
        subnetId: "string",
        subnetRegion: "string",
        vpcId: "string",
    },
    networkId: "string",
    securityGroupIds: ["string"],
    subnetIds: ["string"],
    vpcEndpoints: {
        dataplaneRelays: ["string"],
        restApis: ["string"],
    },
    vpcId: "string",
    vpcStatus: "string",
    workspaceId: "string",
});
type: databricks:MwsNetworks
properties:
    accountId: string
    creationTime: 0
    errorMessages:
        - errorMessage: string
          errorType: string
    gcpNetworkInfo:
        networkProjectId: string
        podIpRangeName: string
        serviceIpRangeName: string
        subnetId: string
        subnetRegion: string
        vpcId: string
    networkId: string
    networkName: string
    securityGroupIds:
        - string
    subnetIds:
        - string
    vpcEndpoints:
        dataplaneRelays:
            - string
        restApis:
            - string
    vpcId: string
    vpcStatus: string
    workspaceId: string
MwsNetworks Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The MwsNetworks resource accepts the following input properties:
- AccountId string
- Account Id that could be found in the top right corner of Accounts Console
- NetworkName string
- name under which this network is registered
- CreationTime int
- ErrorMessages List<MwsNetworks Error Message> 
- GcpNetwork MwsInfo Networks Gcp Network Info 
- a block consists of Google Cloud specific information for this network, for example the VPC ID, subnet ID, and secondary IP ranges. It has the following fields:
- NetworkId string
- (String) id of network to be used for databricks.MwsWorkspaces resource.
- SecurityGroup List<string>Ids 
- ids of aws_security_group
- SubnetIds List<string>
- ids of aws_subnet
- VpcEndpoints MwsNetworks Vpc Endpoints 
- mapping of databricks.MwsVpcEndpoint for PrivateLink or Private Service Connect connections
- VpcId string
- aws_vpc id
- VpcStatus string
- (String) VPC attachment status
- WorkspaceId string
- (Integer) id of associated workspace
- AccountId string
- Account Id that could be found in the top right corner of Accounts Console
- NetworkName string
- name under which this network is registered
- CreationTime int
- ErrorMessages []MwsNetworks Error Message Args 
- GcpNetwork MwsInfo Networks Gcp Network Info Args 
- a block consists of Google Cloud specific information for this network, for example the VPC ID, subnet ID, and secondary IP ranges. It has the following fields:
- NetworkId string
- (String) id of network to be used for databricks.MwsWorkspaces resource.
- SecurityGroup []stringIds 
- ids of aws_security_group
- SubnetIds []string
- ids of aws_subnet
- VpcEndpoints MwsNetworks Vpc Endpoints Args 
- mapping of databricks.MwsVpcEndpoint for PrivateLink or Private Service Connect connections
- VpcId string
- aws_vpc id
- VpcStatus string
- (String) VPC attachment status
- WorkspaceId string
- (Integer) id of associated workspace
- accountId String
- Account Id that could be found in the top right corner of Accounts Console
- networkName String
- name under which this network is registered
- creationTime Integer
- errorMessages List<MwsNetworks Error Message> 
- gcpNetwork MwsInfo Networks Gcp Network Info 
- a block consists of Google Cloud specific information for this network, for example the VPC ID, subnet ID, and secondary IP ranges. It has the following fields:
- networkId String
- (String) id of network to be used for databricks.MwsWorkspaces resource.
- securityGroup List<String>Ids 
- ids of aws_security_group
- subnetIds List<String>
- ids of aws_subnet
- vpcEndpoints MwsNetworks Vpc Endpoints 
- mapping of databricks.MwsVpcEndpoint for PrivateLink or Private Service Connect connections
- vpcId String
- aws_vpc id
- vpcStatus String
- (String) VPC attachment status
- workspaceId String
- (Integer) id of associated workspace
- accountId string
- Account Id that could be found in the top right corner of Accounts Console
- networkName string
- name under which this network is registered
- creationTime number
- errorMessages MwsNetworks Error Message[] 
- gcpNetwork MwsInfo Networks Gcp Network Info 
- a block consists of Google Cloud specific information for this network, for example the VPC ID, subnet ID, and secondary IP ranges. It has the following fields:
- networkId string
- (String) id of network to be used for databricks.MwsWorkspaces resource.
- securityGroup string[]Ids 
- ids of aws_security_group
- subnetIds string[]
- ids of aws_subnet
- vpcEndpoints MwsNetworks Vpc Endpoints 
- mapping of databricks.MwsVpcEndpoint for PrivateLink or Private Service Connect connections
- vpcId string
- aws_vpc id
- vpcStatus string
- (String) VPC attachment status
- workspaceId string
- (Integer) id of associated workspace
- account_id str
- Account Id that could be found in the top right corner of Accounts Console
- network_name str
- name under which this network is registered
- creation_time int
- error_messages Sequence[MwsNetworks Error Message Args] 
- gcp_network_ Mwsinfo Networks Gcp Network Info Args 
- a block consists of Google Cloud specific information for this network, for example the VPC ID, subnet ID, and secondary IP ranges. It has the following fields:
- network_id str
- (String) id of network to be used for databricks.MwsWorkspaces resource.
- security_group_ Sequence[str]ids 
- ids of aws_security_group
- subnet_ids Sequence[str]
- ids of aws_subnet
- vpc_endpoints MwsNetworks Vpc Endpoints Args 
- mapping of databricks.MwsVpcEndpoint for PrivateLink or Private Service Connect connections
- vpc_id str
- aws_vpc id
- vpc_status str
- (String) VPC attachment status
- workspace_id str
- (Integer) id of associated workspace
- accountId String
- Account Id that could be found in the top right corner of Accounts Console
- networkName String
- name under which this network is registered
- creationTime Number
- errorMessages List<Property Map>
- gcpNetwork Property MapInfo 
- a block consists of Google Cloud specific information for this network, for example the VPC ID, subnet ID, and secondary IP ranges. It has the following fields:
- networkId String
- (String) id of network to be used for databricks.MwsWorkspaces resource.
- securityGroup List<String>Ids 
- ids of aws_security_group
- subnetIds List<String>
- ids of aws_subnet
- vpcEndpoints Property Map
- mapping of databricks.MwsVpcEndpoint for PrivateLink or Private Service Connect connections
- vpcId String
- aws_vpc id
- vpcStatus String
- (String) VPC attachment status
- workspaceId String
- (Integer) id of associated workspace
Outputs
All input properties are implicitly available as output properties. Additionally, the MwsNetworks 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 MwsNetworks Resource
Get an existing MwsNetworks 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?: MwsNetworksState, opts?: CustomResourceOptions): MwsNetworks@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        creation_time: Optional[int] = None,
        error_messages: Optional[Sequence[MwsNetworksErrorMessageArgs]] = None,
        gcp_network_info: Optional[MwsNetworksGcpNetworkInfoArgs] = None,
        network_id: Optional[str] = None,
        network_name: Optional[str] = None,
        security_group_ids: Optional[Sequence[str]] = None,
        subnet_ids: Optional[Sequence[str]] = None,
        vpc_endpoints: Optional[MwsNetworksVpcEndpointsArgs] = None,
        vpc_id: Optional[str] = None,
        vpc_status: Optional[str] = None,
        workspace_id: Optional[str] = None) -> MwsNetworksfunc GetMwsNetworks(ctx *Context, name string, id IDInput, state *MwsNetworksState, opts ...ResourceOption) (*MwsNetworks, error)public static MwsNetworks Get(string name, Input<string> id, MwsNetworksState? state, CustomResourceOptions? opts = null)public static MwsNetworks get(String name, Output<String> id, MwsNetworksState state, CustomResourceOptions options)resources:  _:    type: databricks:MwsNetworks    get:      id: ${id}- 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.
- AccountId string
- Account Id that could be found in the top right corner of Accounts Console
- CreationTime int
- ErrorMessages List<MwsNetworks Error Message> 
- GcpNetwork MwsInfo Networks Gcp Network Info 
- a block consists of Google Cloud specific information for this network, for example the VPC ID, subnet ID, and secondary IP ranges. It has the following fields:
- NetworkId string
- (String) id of network to be used for databricks.MwsWorkspaces resource.
- NetworkName string
- name under which this network is registered
- SecurityGroup List<string>Ids 
- ids of aws_security_group
- SubnetIds List<string>
- ids of aws_subnet
- VpcEndpoints MwsNetworks Vpc Endpoints 
- mapping of databricks.MwsVpcEndpoint for PrivateLink or Private Service Connect connections
- VpcId string
- aws_vpc id
- VpcStatus string
- (String) VPC attachment status
- WorkspaceId string
- (Integer) id of associated workspace
- AccountId string
- Account Id that could be found in the top right corner of Accounts Console
- CreationTime int
- ErrorMessages []MwsNetworks Error Message Args 
- GcpNetwork MwsInfo Networks Gcp Network Info Args 
- a block consists of Google Cloud specific information for this network, for example the VPC ID, subnet ID, and secondary IP ranges. It has the following fields:
- NetworkId string
- (String) id of network to be used for databricks.MwsWorkspaces resource.
- NetworkName string
- name under which this network is registered
- SecurityGroup []stringIds 
- ids of aws_security_group
- SubnetIds []string
- ids of aws_subnet
- VpcEndpoints MwsNetworks Vpc Endpoints Args 
- mapping of databricks.MwsVpcEndpoint for PrivateLink or Private Service Connect connections
- VpcId string
- aws_vpc id
- VpcStatus string
- (String) VPC attachment status
- WorkspaceId string
- (Integer) id of associated workspace
- accountId String
- Account Id that could be found in the top right corner of Accounts Console
- creationTime Integer
- errorMessages List<MwsNetworks Error Message> 
- gcpNetwork MwsInfo Networks Gcp Network Info 
- a block consists of Google Cloud specific information for this network, for example the VPC ID, subnet ID, and secondary IP ranges. It has the following fields:
- networkId String
- (String) id of network to be used for databricks.MwsWorkspaces resource.
- networkName String
- name under which this network is registered
- securityGroup List<String>Ids 
- ids of aws_security_group
- subnetIds List<String>
- ids of aws_subnet
- vpcEndpoints MwsNetworks Vpc Endpoints 
- mapping of databricks.MwsVpcEndpoint for PrivateLink or Private Service Connect connections
- vpcId String
- aws_vpc id
- vpcStatus String
- (String) VPC attachment status
- workspaceId String
- (Integer) id of associated workspace
- accountId string
- Account Id that could be found in the top right corner of Accounts Console
- creationTime number
- errorMessages MwsNetworks Error Message[] 
- gcpNetwork MwsInfo Networks Gcp Network Info 
- a block consists of Google Cloud specific information for this network, for example the VPC ID, subnet ID, and secondary IP ranges. It has the following fields:
- networkId string
- (String) id of network to be used for databricks.MwsWorkspaces resource.
- networkName string
- name under which this network is registered
- securityGroup string[]Ids 
- ids of aws_security_group
- subnetIds string[]
- ids of aws_subnet
- vpcEndpoints MwsNetworks Vpc Endpoints 
- mapping of databricks.MwsVpcEndpoint for PrivateLink or Private Service Connect connections
- vpcId string
- aws_vpc id
- vpcStatus string
- (String) VPC attachment status
- workspaceId string
- (Integer) id of associated workspace
- account_id str
- Account Id that could be found in the top right corner of Accounts Console
- creation_time int
- error_messages Sequence[MwsNetworks Error Message Args] 
- gcp_network_ Mwsinfo Networks Gcp Network Info Args 
- a block consists of Google Cloud specific information for this network, for example the VPC ID, subnet ID, and secondary IP ranges. It has the following fields:
- network_id str
- (String) id of network to be used for databricks.MwsWorkspaces resource.
- network_name str
- name under which this network is registered
- security_group_ Sequence[str]ids 
- ids of aws_security_group
- subnet_ids Sequence[str]
- ids of aws_subnet
- vpc_endpoints MwsNetworks Vpc Endpoints Args 
- mapping of databricks.MwsVpcEndpoint for PrivateLink or Private Service Connect connections
- vpc_id str
- aws_vpc id
- vpc_status str
- (String) VPC attachment status
- workspace_id str
- (Integer) id of associated workspace
- accountId String
- Account Id that could be found in the top right corner of Accounts Console
- creationTime Number
- errorMessages List<Property Map>
- gcpNetwork Property MapInfo 
- a block consists of Google Cloud specific information for this network, for example the VPC ID, subnet ID, and secondary IP ranges. It has the following fields:
- networkId String
- (String) id of network to be used for databricks.MwsWorkspaces resource.
- networkName String
- name under which this network is registered
- securityGroup List<String>Ids 
- ids of aws_security_group
- subnetIds List<String>
- ids of aws_subnet
- vpcEndpoints Property Map
- mapping of databricks.MwsVpcEndpoint for PrivateLink or Private Service Connect connections
- vpcId String
- aws_vpc id
- vpcStatus String
- (String) VPC attachment status
- workspaceId String
- (Integer) id of associated workspace
Supporting Types
MwsNetworksErrorMessage, MwsNetworksErrorMessageArgs        
- ErrorMessage string
- ErrorType string
- ErrorMessage string
- ErrorType string
- errorMessage String
- errorType String
- errorMessage string
- errorType string
- error_message str
- error_type str
- errorMessage String
- errorType String
MwsNetworksGcpNetworkInfo, MwsNetworksGcpNetworkInfoArgs          
- NetworkProject stringId 
- The Google Cloud project ID of the VPC network.
- PodIp stringRange Name 
- The name of the secondary IP range for pods. A Databricks-managed GKE cluster uses this IP range for its pods. This secondary IP range can only be used by one workspace.
- ServiceIp stringRange Name 
- The name of the secondary IP range for services. A Databricks-managed GKE cluster uses this IP range for its services. This secondary IP range can only be used by one workspace.
- SubnetId string
- The ID of the subnet associated with this network.
- SubnetRegion string
- The Google Cloud region of the workspace data plane. For example, us-east4.
- VpcId string
- The ID of the VPC associated with this network. VPC IDs can be used in multiple network configurations.
- NetworkProject stringId 
- The Google Cloud project ID of the VPC network.
- PodIp stringRange Name 
- The name of the secondary IP range for pods. A Databricks-managed GKE cluster uses this IP range for its pods. This secondary IP range can only be used by one workspace.
- ServiceIp stringRange Name 
- The name of the secondary IP range for services. A Databricks-managed GKE cluster uses this IP range for its services. This secondary IP range can only be used by one workspace.
- SubnetId string
- The ID of the subnet associated with this network.
- SubnetRegion string
- The Google Cloud region of the workspace data plane. For example, us-east4.
- VpcId string
- The ID of the VPC associated with this network. VPC IDs can be used in multiple network configurations.
- networkProject StringId 
- The Google Cloud project ID of the VPC network.
- podIp StringRange Name 
- The name of the secondary IP range for pods. A Databricks-managed GKE cluster uses this IP range for its pods. This secondary IP range can only be used by one workspace.
- serviceIp StringRange Name 
- The name of the secondary IP range for services. A Databricks-managed GKE cluster uses this IP range for its services. This secondary IP range can only be used by one workspace.
- subnetId String
- The ID of the subnet associated with this network.
- subnetRegion String
- The Google Cloud region of the workspace data plane. For example, us-east4.
- vpcId String
- The ID of the VPC associated with this network. VPC IDs can be used in multiple network configurations.
- networkProject stringId 
- The Google Cloud project ID of the VPC network.
- podIp stringRange Name 
- The name of the secondary IP range for pods. A Databricks-managed GKE cluster uses this IP range for its pods. This secondary IP range can only be used by one workspace.
- serviceIp stringRange Name 
- The name of the secondary IP range for services. A Databricks-managed GKE cluster uses this IP range for its services. This secondary IP range can only be used by one workspace.
- subnetId string
- The ID of the subnet associated with this network.
- subnetRegion string
- The Google Cloud region of the workspace data plane. For example, us-east4.
- vpcId string
- The ID of the VPC associated with this network. VPC IDs can be used in multiple network configurations.
- network_project_ strid 
- The Google Cloud project ID of the VPC network.
- pod_ip_ strrange_ name 
- The name of the secondary IP range for pods. A Databricks-managed GKE cluster uses this IP range for its pods. This secondary IP range can only be used by one workspace.
- service_ip_ strrange_ name 
- The name of the secondary IP range for services. A Databricks-managed GKE cluster uses this IP range for its services. This secondary IP range can only be used by one workspace.
- subnet_id str
- The ID of the subnet associated with this network.
- subnet_region str
- The Google Cloud region of the workspace data plane. For example, us-east4.
- vpc_id str
- The ID of the VPC associated with this network. VPC IDs can be used in multiple network configurations.
- networkProject StringId 
- The Google Cloud project ID of the VPC network.
- podIp StringRange Name 
- The name of the secondary IP range for pods. A Databricks-managed GKE cluster uses this IP range for its pods. This secondary IP range can only be used by one workspace.
- serviceIp StringRange Name 
- The name of the secondary IP range for services. A Databricks-managed GKE cluster uses this IP range for its services. This secondary IP range can only be used by one workspace.
- subnetId String
- The ID of the subnet associated with this network.
- subnetRegion String
- The Google Cloud region of the workspace data plane. For example, us-east4.
- vpcId String
- The ID of the VPC associated with this network. VPC IDs can be used in multiple network configurations.
MwsNetworksVpcEndpoints, MwsNetworksVpcEndpointsArgs        
- DataplaneRelays List<string>
- RestApis List<string>
- DataplaneRelays []string
- RestApis []string
- dataplaneRelays List<String>
- restApis List<String>
- dataplaneRelays string[]
- restApis string[]
- dataplane_relays Sequence[str]
- rest_apis Sequence[str]
- dataplaneRelays List<String>
- restApis List<String>
Import
This resource can be imported by Databricks account ID and network ID.
$ pulumi import databricks:index/mwsNetworks:MwsNetworks this '<account_id>/<network_id>'
~> This resource does not support updates. If your configuration does not match the existing resource,
the next pulumi up will cause the resource to be destroyed and recreated. After importing,
verify that the configuration matches the existing resource by running pulumi preview.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the databricksTerraform Provider.