databricks.getInstancePool
Explore with Pulumi AI
Note If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add depends_on attribute in order to prevent default auth: cannot configure default credentials errors.
Retrieves information about databricks_instance_pool.
Example Usage
Referring to an instance pool by name:
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const pool = databricks.getInstancePool({
    name: "All spot",
});
const myCluster = new databricks.Cluster("my_cluster", {instancePoolId: pool.then(pool => pool.id)});
import pulumi
import pulumi_databricks as databricks
pool = databricks.get_instance_pool(name="All spot")
my_cluster = databricks.Cluster("my_cluster", instance_pool_id=pool.id)
package main
import (
	"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 {
		pool, err := databricks.LookupInstancePool(ctx, &databricks.LookupInstancePoolArgs{
			Name: "All spot",
		}, nil)
		if err != nil {
			return err
		}
		_, err = databricks.NewCluster(ctx, "my_cluster", &databricks.ClusterArgs{
			InstancePoolId: pulumi.String(pool.Id),
		})
		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 pool = Databricks.GetInstancePool.Invoke(new()
    {
        Name = "All spot",
    });
    var myCluster = new Databricks.Cluster("my_cluster", new()
    {
        InstancePoolId = pool.Apply(getInstancePoolResult => getInstancePoolResult.Id),
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.DatabricksFunctions;
import com.pulumi.databricks.inputs.GetInstancePoolArgs;
import com.pulumi.databricks.Cluster;
import com.pulumi.databricks.ClusterArgs;
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 pool = DatabricksFunctions.getInstancePool(GetInstancePoolArgs.builder()
            .name("All spot")
            .build());
        var myCluster = new Cluster("myCluster", ClusterArgs.builder()
            .instancePoolId(pool.applyValue(getInstancePoolResult -> getInstancePoolResult.id()))
            .build());
    }
}
resources:
  myCluster:
    type: databricks:Cluster
    name: my_cluster
    properties:
      instancePoolId: ${pool.id}
variables:
  pool:
    fn::invoke:
      Function: databricks:getInstancePool
      Arguments:
        name: All spot
Using getInstancePool
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 getInstancePool(args: GetInstancePoolArgs, opts?: InvokeOptions): Promise<GetInstancePoolResult>
function getInstancePoolOutput(args: GetInstancePoolOutputArgs, opts?: InvokeOptions): Output<GetInstancePoolResult>def get_instance_pool(name: Optional[str] = None,
                      pool_info: Optional[GetInstancePoolPoolInfo] = None,
                      opts: Optional[InvokeOptions] = None) -> GetInstancePoolResult
def get_instance_pool_output(name: Optional[pulumi.Input[str]] = None,
                      pool_info: Optional[pulumi.Input[GetInstancePoolPoolInfoArgs]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetInstancePoolResult]func LookupInstancePool(ctx *Context, args *LookupInstancePoolArgs, opts ...InvokeOption) (*LookupInstancePoolResult, error)
func LookupInstancePoolOutput(ctx *Context, args *LookupInstancePoolOutputArgs, opts ...InvokeOption) LookupInstancePoolResultOutput> Note: This function is named LookupInstancePool in the Go SDK.
public static class GetInstancePool 
{
    public static Task<GetInstancePoolResult> InvokeAsync(GetInstancePoolArgs args, InvokeOptions? opts = null)
    public static Output<GetInstancePoolResult> Invoke(GetInstancePoolInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetInstancePoolResult> getInstancePool(GetInstancePoolArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: databricks:index/getInstancePool:getInstancePool
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
 - Name of the instance pool. The instance pool must exist before this resource can be planned.
 - Pool
Info GetInstance Pool Pool Info  - block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.
 
- Name string
 - Name of the instance pool. The instance pool must exist before this resource can be planned.
 - Pool
Info GetInstance Pool Pool Info  - block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.
 
- name String
 - Name of the instance pool. The instance pool must exist before this resource can be planned.
 - pool
Info GetInstance Pool Pool Info  - block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.
 
- name string
 - Name of the instance pool. The instance pool must exist before this resource can be planned.
 - pool
Info GetInstance Pool Pool Info  - block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.
 
- name str
 - Name of the instance pool. The instance pool must exist before this resource can be planned.
 - pool_
info GetInstance Pool Pool Info  - block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.
 
- name String
 - Name of the instance pool. The instance pool must exist before this resource can be planned.
 - pool
Info Property Map - block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.
 
getInstancePool Result
The following output properties are available:
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Name string
 - Pool
Info GetInstance Pool Pool Info  - block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.
 
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Name string
 - Pool
Info GetInstance Pool Pool Info  - block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - name String
 - pool
Info GetInstance Pool Pool Info  - block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.
 
- id string
 - The provider-assigned unique ID for this managed resource.
 - name string
 - pool
Info GetInstance Pool Pool Info  - block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.
 
- id str
 - The provider-assigned unique ID for this managed resource.
 - name str
 - pool_
info GetInstance Pool Pool Info  - block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - name String
 - pool
Info Property Map - block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.
 
Supporting Types
GetInstancePoolPoolInfo    
- Dictionary<string, string>
 - Idle
Instance intAutotermination Minutes  - Instance
Pool stringId  - Instance
Pool stringName  - Aws
Attributes GetInstance Pool Pool Info Aws Attributes  - Azure
Attributes GetInstance Pool Pool Info Azure Attributes  - Dictionary<string, string>
 - Disk
Spec GetInstance Pool Pool Info Disk Spec  - Enable
Elastic boolDisk  - Gcp
Attributes GetInstance Pool Pool Info Gcp Attributes  - Instance
Pool List<GetFleet Attributes Instance Pool Pool Info Instance Pool Fleet Attribute>  - Max
Capacity int - Min
Idle intInstances  - Node
Type stringId  - Preloaded
Docker List<GetImages Instance Pool Pool Info Preloaded Docker Image>  - Preloaded
Spark List<string>Versions  - State string
 - Stats
Get
Instance Pool Pool Info Stats  
- map[string]string
 - Idle
Instance intAutotermination Minutes  - Instance
Pool stringId  - Instance
Pool stringName  - Aws
Attributes GetInstance Pool Pool Info Aws Attributes  - Azure
Attributes GetInstance Pool Pool Info Azure Attributes  - map[string]string
 - Disk
Spec GetInstance Pool Pool Info Disk Spec  - Enable
Elastic boolDisk  - Gcp
Attributes GetInstance Pool Pool Info Gcp Attributes  - Instance
Pool []GetFleet Attributes Instance Pool Pool Info Instance Pool Fleet Attribute  - Max
Capacity int - Min
Idle intInstances  - Node
Type stringId  - Preloaded
Docker []GetImages Instance Pool Pool Info Preloaded Docker Image  - Preloaded
Spark []stringVersions  - State string
 - Stats
Get
Instance Pool Pool Info Stats  
- Map<String,String>
 - idle
Instance IntegerAutotermination Minutes  - instance
Pool StringId  - instance
Pool StringName  - aws
Attributes GetInstance Pool Pool Info Aws Attributes  - azure
Attributes GetInstance Pool Pool Info Azure Attributes  - Map<String,String>
 - disk
Spec GetInstance Pool Pool Info Disk Spec  - enable
Elastic BooleanDisk  - gcp
Attributes GetInstance Pool Pool Info Gcp Attributes  - instance
Pool List<GetFleet Attributes Instance Pool Pool Info Instance Pool Fleet Attribute>  - max
Capacity Integer - min
Idle IntegerInstances  - node
Type StringId  - preloaded
Docker List<GetImages Instance Pool Pool Info Preloaded Docker Image>  - preloaded
Spark List<String>Versions  - state String
 - stats
Get
Instance Pool Pool Info Stats  
- {[key: string]: string}
 - idle
Instance numberAutotermination Minutes  - instance
Pool stringId  - instance
Pool stringName  - aws
Attributes GetInstance Pool Pool Info Aws Attributes  - azure
Attributes GetInstance Pool Pool Info Azure Attributes  - {[key: string]: string}
 - disk
Spec GetInstance Pool Pool Info Disk Spec  - enable
Elastic booleanDisk  - gcp
Attributes GetInstance Pool Pool Info Gcp Attributes  - instance
Pool GetFleet Attributes Instance Pool Pool Info Instance Pool Fleet Attribute[]  - max
Capacity number - min
Idle numberInstances  - node
Type stringId  - preloaded
Docker GetImages Instance Pool Pool Info Preloaded Docker Image[]  - preloaded
Spark string[]Versions  - state string
 - stats
Get
Instance Pool Pool Info Stats  
- Mapping[str, str]
 - idle_
instance_ intautotermination_ minutes  - instance_
pool_ strid  - instance_
pool_ strname  - aws_
attributes GetInstance Pool Pool Info Aws Attributes  - azure_
attributes GetInstance Pool Pool Info Azure Attributes  - Mapping[str, str]
 - disk_
spec GetInstance Pool Pool Info Disk Spec  - enable_
elastic_ booldisk  - gcp_
attributes GetInstance Pool Pool Info Gcp Attributes  - instance_
pool_ Sequence[Getfleet_ attributes Instance Pool Pool Info Instance Pool Fleet Attribute]  - max_
capacity int - min_
idle_ intinstances  - node_
type_ strid  - preloaded_
docker_ Sequence[Getimages Instance Pool Pool Info Preloaded Docker Image]  - preloaded_
spark_ Sequence[str]versions  - state str
 - stats
Get
Instance Pool Pool Info Stats  
- Map<String>
 - idle
Instance NumberAutotermination Minutes  - instance
Pool StringId  - instance
Pool StringName  - aws
Attributes Property Map - azure
Attributes Property Map - Map<String>
 - disk
Spec Property Map - enable
Elastic BooleanDisk  - gcp
Attributes Property Map - instance
Pool List<Property Map>Fleet Attributes  - max
Capacity Number - min
Idle NumberInstances  - node
Type StringId  - preloaded
Docker List<Property Map>Images  - preloaded
Spark List<String>Versions  - state String
 - stats Property Map
 
GetInstancePoolPoolInfoAwsAttributes      
- Zone
Id string - Availability string
 - Spot
Bid intPrice Percent  
- Zone
Id string - Availability string
 - Spot
Bid intPrice Percent  
- zone
Id String - availability String
 - spot
Bid IntegerPrice Percent  
- zone
Id string - availability string
 - spot
Bid numberPrice Percent  
- zone_
id str - availability str
 - spot_
bid_ intprice_ percent  
- zone
Id String - availability String
 - spot
Bid NumberPrice Percent  
GetInstancePoolPoolInfoAzureAttributes      
- Availability string
 - Spot
Bid doubleMax Price  
- Availability string
 - Spot
Bid float64Max Price  
- availability String
 - spot
Bid DoubleMax Price  
- availability string
 - spot
Bid numberMax Price  
- availability str
 - spot_
bid_ floatmax_ price  
- availability String
 - spot
Bid NumberMax Price  
GetInstancePoolPoolInfoDiskSpec      
- disk
Count Integer - disk
Size Integer - disk
Type GetInstance Pool Pool Info Disk Spec Disk Type  
- disk
Count Number - disk
Size Number - disk
Type Property Map 
GetInstancePoolPoolInfoDiskSpecDiskType        
- Azure
Disk stringVolume Type  - Ebs
Volume stringType  
- Azure
Disk stringVolume Type  - Ebs
Volume stringType  
- azure
Disk StringVolume Type  - ebs
Volume StringType  
- azure
Disk stringVolume Type  - ebs
Volume stringType  
- azure
Disk StringVolume Type  - ebs
Volume StringType  
GetInstancePoolPoolInfoGcpAttributes      
- Local
Ssd intCount  - Zone
Id string - Gcp
Availability string 
- Local
Ssd intCount  - Zone
Id string - Gcp
Availability string 
- local
Ssd IntegerCount  - zone
Id String - gcp
Availability String 
- local
Ssd numberCount  - zone
Id string - gcp
Availability string 
- local_
ssd_ intcount  - zone_
id str - gcp_
availability str 
- local
Ssd NumberCount  - zone
Id String - gcp
Availability String 
GetInstancePoolPoolInfoInstancePoolFleetAttribute        
GetInstancePoolPoolInfoInstancePoolFleetAttributeFleetOnDemandOption            
- Allocation
Strategy string - Instance
Pools intTo Use Count  
- Allocation
Strategy string - Instance
Pools intTo Use Count  
- allocation
Strategy String - instance
Pools IntegerTo Use Count  
- allocation
Strategy string - instance
Pools numberTo Use Count  
- allocation
Strategy String - instance
Pools NumberTo Use Count  
GetInstancePoolPoolInfoInstancePoolFleetAttributeFleetSpotOption           
- Allocation
Strategy string - Instance
Pools intTo Use Count  
- Allocation
Strategy string - Instance
Pools intTo Use Count  
- allocation
Strategy String - instance
Pools IntegerTo Use Count  
- allocation
Strategy string - instance
Pools numberTo Use Count  
- allocation
Strategy String - instance
Pools NumberTo Use Count  
GetInstancePoolPoolInfoInstancePoolFleetAttributeLaunchTemplateOverride           
- Availability
Zone string - Instance
Type string 
- Availability
Zone string - Instance
Type string 
- availability
Zone String - instance
Type String 
- availability
Zone string - instance
Type string 
- availability_
zone str - instance_
type str 
- availability
Zone String - instance
Type String 
GetInstancePoolPoolInfoPreloadedDockerImage       
- url String
 - basic
Auth Property Map 
GetInstancePoolPoolInfoPreloadedDockerImageBasicAuth         
GetInstancePoolPoolInfoStats     
- Idle
Count int - Pending
Idle intCount  - Pending
Used intCount  - Used
Count int 
- Idle
Count int - Pending
Idle intCount  - Pending
Used intCount  - Used
Count int 
- idle
Count Integer - pending
Idle IntegerCount  - pending
Used IntegerCount  - used
Count Integer 
- idle
Count number - pending
Idle numberCount  - pending
Used numberCount  - used
Count number 
- idle_
count int - pending_
idle_ intcount  - pending_
used_ intcount  - used_
count int 
- idle
Count Number - pending
Idle NumberCount  - pending
Used NumberCount  - used
Count Number 
Package Details
- Repository
 - databricks pulumi/pulumi-databricks
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
databricksTerraform Provider.