1. Packages
  2. CAST AI
  3. API Docs
  4. Cluster
CAST AI v0.1.72 published on Monday, May 12, 2025 by CAST AI

castai.Cluster

Explore with Pulumi AI

Create Cluster Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Cluster(name: string, args: ClusterArgs, opts?: CustomResourceOptions);
@overload
def Cluster(resource_name: str,
            args: ClusterArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Cluster(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            credentials: Optional[Sequence[str]] = None,
            initialize_params: Optional[ClusterInitializeParamsArgs] = None,
            region: Optional[str] = None,
            autoscaler_policies: Optional[ClusterAutoscalerPoliciesArgs] = None,
            name: Optional[str] = None,
            status: Optional[str] = None,
            vpn_type: Optional[str] = None)
func NewCluster(ctx *Context, name string, args ClusterArgs, opts ...ResourceOption) (*Cluster, error)
public Cluster(string name, ClusterArgs args, CustomResourceOptions? opts = null)
public Cluster(String name, ClusterArgs args)
public Cluster(String name, ClusterArgs args, CustomResourceOptions options)
type: castai:Cluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ClusterArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ClusterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ClusterArgs
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 clusterResource = new CastAI.Cluster("clusterResource", new()
{
    Credentials = new[]
    {
        "string",
    },
    InitializeParams = new CastAI.Inputs.ClusterInitializeParamsArgs
    {
        Nodes = new[]
        {
            new CastAI.Inputs.ClusterInitializeParamsNodeArgs
            {
                Cloud = "string",
                Role = "string",
                Shape = "string",
            },
        },
    },
    Region = "string",
    AutoscalerPolicies = new CastAI.Inputs.ClusterAutoscalerPoliciesArgs
    {
        ClusterLimits = new CastAI.Inputs.ClusterAutoscalerPoliciesClusterLimitsArgs
        {
            Cpu = new CastAI.Inputs.ClusterAutoscalerPoliciesClusterLimitsCpuArgs
            {
                MaxCores = 0,
                MinCores = 0,
            },
            Enabled = false,
        },
        Enabled = false,
        NodeDownscaler = new CastAI.Inputs.ClusterAutoscalerPoliciesNodeDownscalerArgs
        {
            EmptyNodes = new CastAI.Inputs.ClusterAutoscalerPoliciesNodeDownscalerEmptyNodesArgs
            {
                DelaySeconds = 0,
                Enabled = false,
            },
        },
        SpotInstances = new CastAI.Inputs.ClusterAutoscalerPoliciesSpotInstancesArgs
        {
            Clouds = new[]
            {
                "string",
            },
            Enabled = false,
        },
        UnschedulablePods = new CastAI.Inputs.ClusterAutoscalerPoliciesUnschedulablePodsArgs
        {
            Enabled = false,
            Headroom = new CastAI.Inputs.ClusterAutoscalerPoliciesUnschedulablePodsHeadroomArgs
            {
                CpuPercentage = 0,
                Enabled = false,
                MemoryPercentage = 0,
            },
            NodeConstraints = new CastAI.Inputs.ClusterAutoscalerPoliciesUnschedulablePodsNodeConstraintsArgs
            {
                Enabled = false,
                MaxNodeCpuCores = 0,
                MaxNodeRamGib = 0,
                MinNodeCpuCores = 0,
                MinNodeRamGib = 0,
            },
        },
    },
    Name = "string",
    Status = "string",
    VpnType = "string",
});
Copy
example, err := castai.NewCluster(ctx, "clusterResource", &castai.ClusterArgs{
	Credentials: pulumi.StringArray{
		pulumi.String("string"),
	},
	InitializeParams: &castai.ClusterInitializeParamsArgs{
		Nodes: castai.ClusterInitializeParamsNodeArray{
			&castai.ClusterInitializeParamsNodeArgs{
				Cloud: pulumi.String("string"),
				Role:  pulumi.String("string"),
				Shape: pulumi.String("string"),
			},
		},
	},
	Region: pulumi.String("string"),
	AutoscalerPolicies: &castai.ClusterAutoscalerPoliciesArgs{
		ClusterLimits: &castai.ClusterAutoscalerPoliciesClusterLimitsArgs{
			Cpu: &castai.ClusterAutoscalerPoliciesClusterLimitsCpuArgs{
				MaxCores: pulumi.Int(0),
				MinCores: pulumi.Int(0),
			},
			Enabled: pulumi.Bool(false),
		},
		Enabled: pulumi.Bool(false),
		NodeDownscaler: &castai.ClusterAutoscalerPoliciesNodeDownscalerArgs{
			EmptyNodes: &castai.ClusterAutoscalerPoliciesNodeDownscalerEmptyNodesArgs{
				DelaySeconds: pulumi.Int(0),
				Enabled:      pulumi.Bool(false),
			},
		},
		SpotInstances: &castai.ClusterAutoscalerPoliciesSpotInstancesArgs{
			Clouds: pulumi.StringArray{
				pulumi.String("string"),
			},
			Enabled: pulumi.Bool(false),
		},
		UnschedulablePods: &castai.ClusterAutoscalerPoliciesUnschedulablePodsArgs{
			Enabled: pulumi.Bool(false),
			Headroom: &castai.ClusterAutoscalerPoliciesUnschedulablePodsHeadroomArgs{
				CpuPercentage:    pulumi.Int(0),
				Enabled:          pulumi.Bool(false),
				MemoryPercentage: pulumi.Int(0),
			},
			NodeConstraints: &castai.ClusterAutoscalerPoliciesUnschedulablePodsNodeConstraintsArgs{
				Enabled:         pulumi.Bool(false),
				MaxNodeCpuCores: pulumi.Int(0),
				MaxNodeRamGib:   pulumi.Int(0),
				MinNodeCpuCores: pulumi.Int(0),
				MinNodeRamGib:   pulumi.Int(0),
			},
		},
	},
	Name:    pulumi.String("string"),
	Status:  pulumi.String("string"),
	VpnType: pulumi.String("string"),
})
Copy
var clusterResource = new Cluster("clusterResource", ClusterArgs.builder()
    .credentials("string")
    .initializeParams(ClusterInitializeParamsArgs.builder()
        .nodes(ClusterInitializeParamsNodeArgs.builder()
            .cloud("string")
            .role("string")
            .shape("string")
            .build())
        .build())
    .region("string")
    .autoscalerPolicies(ClusterAutoscalerPoliciesArgs.builder()
        .clusterLimits(ClusterAutoscalerPoliciesClusterLimitsArgs.builder()
            .cpu(ClusterAutoscalerPoliciesClusterLimitsCpuArgs.builder()
                .maxCores(0)
                .minCores(0)
                .build())
            .enabled(false)
            .build())
        .enabled(false)
        .nodeDownscaler(ClusterAutoscalerPoliciesNodeDownscalerArgs.builder()
            .emptyNodes(ClusterAutoscalerPoliciesNodeDownscalerEmptyNodesArgs.builder()
                .delaySeconds(0)
                .enabled(false)
                .build())
            .build())
        .spotInstances(ClusterAutoscalerPoliciesSpotInstancesArgs.builder()
            .clouds("string")
            .enabled(false)
            .build())
        .unschedulablePods(ClusterAutoscalerPoliciesUnschedulablePodsArgs.builder()
            .enabled(false)
            .headroom(ClusterAutoscalerPoliciesUnschedulablePodsHeadroomArgs.builder()
                .cpuPercentage(0)
                .enabled(false)
                .memoryPercentage(0)
                .build())
            .nodeConstraints(ClusterAutoscalerPoliciesUnschedulablePodsNodeConstraintsArgs.builder()
                .enabled(false)
                .maxNodeCpuCores(0)
                .maxNodeRamGib(0)
                .minNodeCpuCores(0)
                .minNodeRamGib(0)
                .build())
            .build())
        .build())
    .name("string")
    .status("string")
    .vpnType("string")
    .build());
Copy
cluster_resource = castai.Cluster("clusterResource",
    credentials=["string"],
    initialize_params={
        "nodes": [{
            "cloud": "string",
            "role": "string",
            "shape": "string",
        }],
    },
    region="string",
    autoscaler_policies={
        "cluster_limits": {
            "cpu": {
                "max_cores": 0,
                "min_cores": 0,
            },
            "enabled": False,
        },
        "enabled": False,
        "node_downscaler": {
            "empty_nodes": {
                "delay_seconds": 0,
                "enabled": False,
            },
        },
        "spot_instances": {
            "clouds": ["string"],
            "enabled": False,
        },
        "unschedulable_pods": {
            "enabled": False,
            "headroom": {
                "cpu_percentage": 0,
                "enabled": False,
                "memory_percentage": 0,
            },
            "node_constraints": {
                "enabled": False,
                "max_node_cpu_cores": 0,
                "max_node_ram_gib": 0,
                "min_node_cpu_cores": 0,
                "min_node_ram_gib": 0,
            },
        },
    },
    name="string",
    status="string",
    vpn_type="string")
Copy
const clusterResource = new castai.Cluster("clusterResource", {
    credentials: ["string"],
    initializeParams: {
        nodes: [{
            cloud: "string",
            role: "string",
            shape: "string",
        }],
    },
    region: "string",
    autoscalerPolicies: {
        clusterLimits: {
            cpu: {
                maxCores: 0,
                minCores: 0,
            },
            enabled: false,
        },
        enabled: false,
        nodeDownscaler: {
            emptyNodes: {
                delaySeconds: 0,
                enabled: false,
            },
        },
        spotInstances: {
            clouds: ["string"],
            enabled: false,
        },
        unschedulablePods: {
            enabled: false,
            headroom: {
                cpuPercentage: 0,
                enabled: false,
                memoryPercentage: 0,
            },
            nodeConstraints: {
                enabled: false,
                maxNodeCpuCores: 0,
                maxNodeRamGib: 0,
                minNodeCpuCores: 0,
                minNodeRamGib: 0,
            },
        },
    },
    name: "string",
    status: "string",
    vpnType: "string",
});
Copy
type: castai:Cluster
properties:
    autoscalerPolicies:
        clusterLimits:
            cpu:
                maxCores: 0
                minCores: 0
            enabled: false
        enabled: false
        nodeDownscaler:
            emptyNodes:
                delaySeconds: 0
                enabled: false
        spotInstances:
            clouds:
                - string
            enabled: false
        unschedulablePods:
            enabled: false
            headroom:
                cpuPercentage: 0
                enabled: false
                memoryPercentage: 0
            nodeConstraints:
                enabled: false
                maxNodeCpuCores: 0
                maxNodeRamGib: 0
                minNodeCpuCores: 0
                minNodeRamGib: 0
    credentials:
        - string
    initializeParams:
        nodes:
            - cloud: string
              role: string
              shape: string
    name: string
    region: string
    status: string
    vpnType: string
Copy

Cluster 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 Cluster resource accepts the following input properties:

Credentials This property is required. List<string>
InitializeParams
This property is required.
Changes to this property will trigger replacement.
Pulumi.CastAI.Inputs.ClusterInitializeParams
Region
This property is required.
Changes to this property will trigger replacement.
string
AutoscalerPolicies Pulumi.CastAI.Inputs.ClusterAutoscalerPolicies
Name Changes to this property will trigger replacement. string
Status string
VpnType string
Credentials This property is required. []string
InitializeParams
This property is required.
Changes to this property will trigger replacement.
ClusterInitializeParamsArgs
Region
This property is required.
Changes to this property will trigger replacement.
string
AutoscalerPolicies ClusterAutoscalerPoliciesArgs
Name Changes to this property will trigger replacement. string
Status string
VpnType string
credentials This property is required. List<String>
initializeParams
This property is required.
Changes to this property will trigger replacement.
ClusterInitializeParams
region
This property is required.
Changes to this property will trigger replacement.
String
autoscalerPolicies ClusterAutoscalerPolicies
name Changes to this property will trigger replacement. String
status String
vpnType String
credentials This property is required. string[]
initializeParams
This property is required.
Changes to this property will trigger replacement.
ClusterInitializeParams
region
This property is required.
Changes to this property will trigger replacement.
string
autoscalerPolicies ClusterAutoscalerPolicies
name Changes to this property will trigger replacement. string
status string
vpnType string
credentials This property is required. Sequence[str]
initialize_params
This property is required.
Changes to this property will trigger replacement.
ClusterInitializeParamsArgs
region
This property is required.
Changes to this property will trigger replacement.
str
autoscaler_policies ClusterAutoscalerPoliciesArgs
name Changes to this property will trigger replacement. str
status str
vpn_type str
credentials This property is required. List<String>
initializeParams
This property is required.
Changes to this property will trigger replacement.
Property Map
region
This property is required.
Changes to this property will trigger replacement.
String
autoscalerPolicies Property Map
name Changes to this property will trigger replacement. String
status String
vpnType String

Outputs

All input properties are implicitly available as output properties. Additionally, the Cluster resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Kubeconfigs List<Pulumi.CastAI.Outputs.ClusterKubeconfig>
Id string
The provider-assigned unique ID for this managed resource.
Kubeconfigs []ClusterKubeconfig
id String
The provider-assigned unique ID for this managed resource.
kubeconfigs List<ClusterKubeconfig>
id string
The provider-assigned unique ID for this managed resource.
kubeconfigs ClusterKubeconfig[]
id str
The provider-assigned unique ID for this managed resource.
kubeconfigs Sequence[ClusterKubeconfig]
id String
The provider-assigned unique ID for this managed resource.
kubeconfigs List<Property Map>

Look up Existing Cluster Resource

Get an existing Cluster 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?: ClusterState, opts?: CustomResourceOptions): Cluster
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        autoscaler_policies: Optional[ClusterAutoscalerPoliciesArgs] = None,
        credentials: Optional[Sequence[str]] = None,
        initialize_params: Optional[ClusterInitializeParamsArgs] = None,
        kubeconfigs: Optional[Sequence[ClusterKubeconfigArgs]] = None,
        name: Optional[str] = None,
        region: Optional[str] = None,
        status: Optional[str] = None,
        vpn_type: Optional[str] = None) -> Cluster
func GetCluster(ctx *Context, name string, id IDInput, state *ClusterState, opts ...ResourceOption) (*Cluster, error)
public static Cluster Get(string name, Input<string> id, ClusterState? state, CustomResourceOptions? opts = null)
public static Cluster get(String name, Output<String> id, ClusterState state, CustomResourceOptions options)
resources:  _:    type: castai:Cluster    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
AutoscalerPolicies Pulumi.CastAI.Inputs.ClusterAutoscalerPolicies
Credentials List<string>
InitializeParams Changes to this property will trigger replacement. Pulumi.CastAI.Inputs.ClusterInitializeParams
Kubeconfigs List<Pulumi.CastAI.Inputs.ClusterKubeconfig>
Name Changes to this property will trigger replacement. string
Region Changes to this property will trigger replacement. string
Status string
VpnType string
AutoscalerPolicies ClusterAutoscalerPoliciesArgs
Credentials []string
InitializeParams Changes to this property will trigger replacement. ClusterInitializeParamsArgs
Kubeconfigs []ClusterKubeconfigArgs
Name Changes to this property will trigger replacement. string
Region Changes to this property will trigger replacement. string
Status string
VpnType string
autoscalerPolicies ClusterAutoscalerPolicies
credentials List<String>
initializeParams Changes to this property will trigger replacement. ClusterInitializeParams
kubeconfigs List<ClusterKubeconfig>
name Changes to this property will trigger replacement. String
region Changes to this property will trigger replacement. String
status String
vpnType String
autoscalerPolicies ClusterAutoscalerPolicies
credentials string[]
initializeParams Changes to this property will trigger replacement. ClusterInitializeParams
kubeconfigs ClusterKubeconfig[]
name Changes to this property will trigger replacement. string
region Changes to this property will trigger replacement. string
status string
vpnType string
autoscaler_policies ClusterAutoscalerPoliciesArgs
credentials Sequence[str]
initialize_params Changes to this property will trigger replacement. ClusterInitializeParamsArgs
kubeconfigs Sequence[ClusterKubeconfigArgs]
name Changes to this property will trigger replacement. str
region Changes to this property will trigger replacement. str
status str
vpn_type str
autoscalerPolicies Property Map
credentials List<String>
initializeParams Changes to this property will trigger replacement. Property Map
kubeconfigs List<Property Map>
name Changes to this property will trigger replacement. String
region Changes to this property will trigger replacement. String
status String
vpnType String

Supporting Types

ClusterAutoscalerPolicies
, ClusterAutoscalerPoliciesArgs

ClusterAutoscalerPoliciesClusterLimits
, ClusterAutoscalerPoliciesClusterLimitsArgs

ClusterAutoscalerPoliciesClusterLimitsCpu
, ClusterAutoscalerPoliciesClusterLimitsCpuArgs

maxCores Integer
minCores Integer
maxCores number
minCores number
maxCores Number
minCores Number

ClusterAutoscalerPoliciesNodeDownscaler
, ClusterAutoscalerPoliciesNodeDownscalerArgs

ClusterAutoscalerPoliciesNodeDownscalerEmptyNodes
, ClusterAutoscalerPoliciesNodeDownscalerEmptyNodesArgs

delaySeconds Integer
enabled Boolean
delaySeconds number
enabled boolean
delaySeconds Number
enabled Boolean

ClusterAutoscalerPoliciesSpotInstances
, ClusterAutoscalerPoliciesSpotInstancesArgs

Clouds List<string>
Enabled bool
Clouds []string
Enabled bool
clouds List<String>
enabled Boolean
clouds string[]
enabled boolean
clouds Sequence[str]
enabled bool
clouds List<String>
enabled Boolean

ClusterAutoscalerPoliciesUnschedulablePods
, ClusterAutoscalerPoliciesUnschedulablePodsArgs

ClusterAutoscalerPoliciesUnschedulablePodsHeadroom
, ClusterAutoscalerPoliciesUnschedulablePodsHeadroomArgs

cpuPercentage Integer
enabled Boolean
memoryPercentage Integer

ClusterAutoscalerPoliciesUnschedulablePodsNodeConstraints
, ClusterAutoscalerPoliciesUnschedulablePodsNodeConstraintsArgs

ClusterInitializeParams
, ClusterInitializeParamsArgs

Nodes This property is required. []ClusterInitializeParamsNode
nodes This property is required. List<ClusterInitializeParamsNode>
nodes This property is required. ClusterInitializeParamsNode[]
nodes This property is required. Sequence[ClusterInitializeParamsNode]
nodes This property is required. List<Property Map>

ClusterInitializeParamsNode
, ClusterInitializeParamsNodeArgs

Cloud This property is required. string
Role This property is required. string
Shape This property is required. string
Cloud This property is required. string
Role This property is required. string
Shape This property is required. string
cloud This property is required. String
role This property is required. String
shape This property is required. String
cloud This property is required. string
role This property is required. string
shape This property is required. string
cloud This property is required. str
role This property is required. str
shape This property is required. str
cloud This property is required. String
role This property is required. String
shape This property is required. String

ClusterKubeconfig
, ClusterKubeconfigArgs

Package Details

Repository
castai castai/pulumi-castai
License
Apache-2.0
Notes
This Pulumi package is based on the castai Terraform Provider.