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",
});
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"),
})
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());
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")
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",
});
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
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> - Initialize
Params This property is required. Changes to this property will trigger replacement.
Cast AI. Inputs. Cluster Initialize Params - Region
This property is required. Changes to this property will trigger replacement.
- Autoscaler
Policies Pulumi.Cast AI. Inputs. Cluster Autoscaler Policies - Name
Changes to this property will trigger replacement.
- Status string
- Vpn
Type string
- Credentials
This property is required. []string - Initialize
Params This property is required. Changes to this property will trigger replacement.
Initialize Params Args - Region
This property is required. Changes to this property will trigger replacement.
- Autoscaler
Policies ClusterAutoscaler Policies Args - Name
Changes to this property will trigger replacement.
- Status string
- Vpn
Type string
- credentials
This property is required. List<String> - initialize
Params This property is required. Changes to this property will trigger replacement.
Initialize Params - region
This property is required. Changes to this property will trigger replacement.
- autoscaler
Policies ClusterAutoscaler Policies - name
Changes to this property will trigger replacement.
- status String
- vpn
Type String
- credentials
This property is required. string[] - initialize
Params This property is required. Changes to this property will trigger replacement.
Initialize Params - region
This property is required. Changes to this property will trigger replacement.
- autoscaler
Policies ClusterAutoscaler Policies - name
Changes to this property will trigger replacement.
- status string
- vpn
Type string
- credentials
This property is required. Sequence[str] - initialize_
params This property is required. Changes to this property will trigger replacement.
Initialize Params Args - region
This property is required. Changes to this property will trigger replacement.
- autoscaler_
policies ClusterAutoscaler Policies Args - name
Changes to this property will trigger replacement.
- status str
- vpn_
type str
- credentials
This property is required. List<String> - initialize
Params This property is required. Changes to this property will trigger replacement.
- region
This property is required. Changes to this property will trigger replacement.
- autoscaler
Policies Property Map - name
Changes to this property will trigger replacement.
- status String
- vpn
Type 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.
Cast AI. Outputs. Cluster Kubeconfig>
- Id string
- The provider-assigned unique ID for this managed resource.
- Kubeconfigs
[]Cluster
Kubeconfig
- id String
- The provider-assigned unique ID for this managed resource.
- kubeconfigs
List<Cluster
Kubeconfig>
- id string
- The provider-assigned unique ID for this managed resource.
- kubeconfigs
Cluster
Kubeconfig[]
- id str
- The provider-assigned unique ID for this managed resource.
- kubeconfigs
Sequence[Cluster
Kubeconfig]
- 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.
- Autoscaler
Policies Pulumi.Cast AI. Inputs. Cluster Autoscaler Policies - Credentials List<string>
- Initialize
Params Changes to this property will trigger replacement.
Cast AI. Inputs. Cluster Initialize Params - Kubeconfigs
List<Pulumi.
Cast AI. Inputs. Cluster Kubeconfig> - Name
Changes to this property will trigger replacement.
- Region
Changes to this property will trigger replacement.
- Status string
- Vpn
Type string
- Autoscaler
Policies ClusterAutoscaler Policies Args - Credentials []string
- Initialize
Params Changes to this property will trigger replacement.
Initialize Params Args - Kubeconfigs
[]Cluster
Kubeconfig Args - Name
Changes to this property will trigger replacement.
- Region
Changes to this property will trigger replacement.
- Status string
- Vpn
Type string
- autoscaler
Policies ClusterAutoscaler Policies - credentials List<String>
- initialize
Params Changes to this property will trigger replacement.
Initialize Params - kubeconfigs
List<Cluster
Kubeconfig> - name
Changes to this property will trigger replacement.
- region
Changes to this property will trigger replacement.
- status String
- vpn
Type String
- autoscaler
Policies ClusterAutoscaler Policies - credentials string[]
- initialize
Params Changes to this property will trigger replacement.
Initialize Params - kubeconfigs
Cluster
Kubeconfig[] - name
Changes to this property will trigger replacement.
- region
Changes to this property will trigger replacement.
- status string
- vpn
Type string
- autoscaler_
policies ClusterAutoscaler Policies Args - credentials Sequence[str]
- initialize_
params Changes to this property will trigger replacement.
Initialize Params Args - kubeconfigs
Sequence[Cluster
Kubeconfig Args] - name
Changes to this property will trigger replacement.
- region
Changes to this property will trigger replacement.
- status str
- vpn_
type str
- autoscaler
Policies Property Map - credentials List<String>
- initialize
Params Changes to this property will trigger replacement.
- kubeconfigs List<Property Map>
- name
Changes to this property will trigger replacement.
- region
Changes to this property will trigger replacement.
- status String
- vpn
Type String
Supporting Types
ClusterAutoscalerPolicies, ClusterAutoscalerPoliciesArgs
- Cluster
Limits Pulumi.Cast AI. Inputs. Cluster Autoscaler Policies Cluster Limits - Enabled bool
- Node
Downscaler Pulumi.Cast AI. Inputs. Cluster Autoscaler Policies Node Downscaler - Spot
Instances Pulumi.Cast AI. Inputs. Cluster Autoscaler Policies Spot Instances - Unschedulable
Pods Pulumi.Cast AI. Inputs. Cluster Autoscaler Policies Unschedulable Pods
ClusterAutoscalerPoliciesClusterLimits, ClusterAutoscalerPoliciesClusterLimitsArgs
- cpu Property Map
- enabled Boolean
ClusterAutoscalerPoliciesClusterLimitsCpu, ClusterAutoscalerPoliciesClusterLimitsCpuArgs
ClusterAutoscalerPoliciesNodeDownscaler, ClusterAutoscalerPoliciesNodeDownscalerArgs
ClusterAutoscalerPoliciesNodeDownscalerEmptyNodes, ClusterAutoscalerPoliciesNodeDownscalerEmptyNodesArgs
- Delay
Seconds int - Enabled bool
- Delay
Seconds int - Enabled bool
- delay
Seconds Integer - enabled Boolean
- delay
Seconds number - enabled boolean
- delay_
seconds int - enabled bool
- delay
Seconds Number - enabled Boolean
ClusterAutoscalerPoliciesSpotInstances, ClusterAutoscalerPoliciesSpotInstancesArgs
ClusterAutoscalerPoliciesUnschedulablePods, ClusterAutoscalerPoliciesUnschedulablePodsArgs
ClusterAutoscalerPoliciesUnschedulablePodsHeadroom, ClusterAutoscalerPoliciesUnschedulablePodsHeadroomArgs
- Cpu
Percentage int - Enabled bool
- Memory
Percentage int
- Cpu
Percentage int - Enabled bool
- Memory
Percentage int
- cpu
Percentage Integer - enabled Boolean
- memory
Percentage Integer
- cpu
Percentage number - enabled boolean
- memory
Percentage number
- cpu_
percentage int - enabled bool
- memory_
percentage int
- cpu
Percentage Number - enabled Boolean
- memory
Percentage Number
ClusterAutoscalerPoliciesUnschedulablePodsNodeConstraints, ClusterAutoscalerPoliciesUnschedulablePodsNodeConstraintsArgs
- Enabled bool
- Max
Node intCpu Cores - Max
Node intRam Gib - Min
Node intCpu Cores - Min
Node intRam Gib
- Enabled bool
- Max
Node intCpu Cores - Max
Node intRam Gib - Min
Node intCpu Cores - Min
Node intRam Gib
- enabled Boolean
- max
Node IntegerCpu Cores - max
Node IntegerRam Gib - min
Node IntegerCpu Cores - min
Node IntegerRam Gib
- enabled boolean
- max
Node numberCpu Cores - max
Node numberRam Gib - min
Node numberCpu Cores - min
Node numberRam Gib
- enabled bool
- max_
node_ intcpu_ cores - max_
node_ intram_ gib - min_
node_ intcpu_ cores - min_
node_ intram_ gib
- enabled Boolean
- max
Node NumberCpu Cores - max
Node NumberRam Gib - min
Node NumberCpu Cores - min
Node NumberRam Gib
ClusterInitializeParams, ClusterInitializeParamsArgs
- Nodes
This property is required. List<Pulumi.Cast AI. Inputs. Cluster Initialize Params Node>
- Nodes
This property is required. []ClusterInitialize Params Node
- nodes
This property is required. List<ClusterInitialize Params Node>
- nodes
This property is required. ClusterInitialize Params Node[]
- nodes
This property is required. Sequence[ClusterInitialize Params Node]
- nodes
This property is required. List<Property Map>
ClusterInitializeParamsNode, ClusterInitializeParamsNodeArgs
ClusterKubeconfig, ClusterKubeconfigArgs
- Client
Certificate string - Client
Key string - Cluster
Ca stringCertificate - Host string
- Raw
Config string
- Client
Certificate string - Client
Key string - Cluster
Ca stringCertificate - Host string
- Raw
Config string
- client
Certificate String - client
Key String - cluster
Ca StringCertificate - host String
- raw
Config String
- client
Certificate string - client
Key string - cluster
Ca stringCertificate - host string
- raw
Config string
- client_
certificate str - client_
key str - cluster_
ca_ strcertificate - host str
- raw_
config str
- client
Certificate String - client
Key String - cluster
Ca StringCertificate - host String
- raw
Config String
Package Details
- Repository
- castai castai/pulumi-castai
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
castai
Terraform Provider.