1. Packages
  2. Hpegl Provider
  3. API Docs
  4. CaasCluster
hpegl 0.4.18 published on Friday, Apr 18, 2025 by hpe

hpegl.CaasCluster

Explore with Pulumi AI

hpegl logo
hpegl 0.4.18 published on Friday, Apr 18, 2025 by hpe

    The cluster resource facilitates the creation, updation and deletion of a CaaS cluster. There are four required inputs when creating a cluster - name, blueprint_id, site_id and space_id. worker_nodes is an optional input to scale nodes on cluster. Provide the min_size & max_size parameters to trigger Autoscaler. Kubernetes version upgrade is also supported while updating the cluster.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as hpegl from "@pulumi/hpegl";
    
    const config = new pulumi.Config();
    const hPEGLSPACE = config.require("hPEGLSPACE");
    const blr = hpegl.getCaasSite({
        name: "BLR",
        spaceId: hPEGLSPACE,
    });
    const bp = blr.then(blr => hpegl.getCaasClusterBlueprint({
        name: "demo",
        siteId: blr.id,
    }));
    const mbworker = blr.then(blr => hpegl.getCaasMachineBlueprint({
        name: "standard-worker",
        siteId: blr.id,
    }));
    const test = new hpegl.CaasCluster("test", {
        blueprintId: bp.then(bp => bp.id),
        siteId: blr.then(blr => blr.id),
        spaceId: hPEGLSPACE,
        kubernetesVersion: "",
        workerNodes: [{
            name: "worker",
            machineBlueprintId: mbworker.then(mbworker => mbworker.id),
            minSize: "",
            maxSize: "",
        }],
    });
    
    import pulumi
    import pulumi_hpegl as hpegl
    
    config = pulumi.Config()
    h_peglspace = config.require("hPEGLSPACE")
    blr = hpegl.get_caas_site(name="BLR",
        space_id=h_peglspace)
    bp = hpegl.get_caas_cluster_blueprint(name="demo",
        site_id=blr.id)
    mbworker = hpegl.get_caas_machine_blueprint(name="standard-worker",
        site_id=blr.id)
    test = hpegl.CaasCluster("test",
        blueprint_id=bp.id,
        site_id=blr.id,
        space_id=h_peglspace,
        kubernetes_version="",
        worker_nodes=[{
            "name": "worker",
            "machine_blueprint_id": mbworker.id,
            "min_size": "",
            "max_size": "",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/hpegl/hpegl"
    	"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, "")
    		hPEGLSPACE := cfg.Require("hPEGLSPACE")
    		blr, err := hpegl.GetCaasSite(ctx, &hpegl.GetCaasSiteArgs{
    			Name:    "BLR",
    			SpaceId: hPEGLSPACE,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		bp, err := hpegl.LookupCaasClusterBlueprint(ctx, &hpegl.LookupCaasClusterBlueprintArgs{
    			Name:   "demo",
    			SiteId: blr.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		mbworker, err := hpegl.LookupCaasMachineBlueprint(ctx, &hpegl.LookupCaasMachineBlueprintArgs{
    			Name:   "standard-worker",
    			SiteId: blr.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = hpegl.NewCaasCluster(ctx, "test", &hpegl.CaasClusterArgs{
    			BlueprintId:       pulumi.String(bp.Id),
    			SiteId:            pulumi.String(blr.Id),
    			SpaceId:           pulumi.String(hPEGLSPACE),
    			KubernetesVersion: pulumi.String(""),
    			WorkerNodes: hpegl.CaasClusterWorkerNodeArray{
    				&hpegl.CaasClusterWorkerNodeArgs{
    					Name:               pulumi.String("worker"),
    					MachineBlueprintId: pulumi.String(mbworker.Id),
    					MinSize:            pulumi.Float64(""),
    					MaxSize:            pulumi.Float64(""),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Hpegl = Pulumi.Hpegl;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var hPEGLSPACE = config.Require("hPEGLSPACE");
        var blr = Hpegl.GetCaasSite.Invoke(new()
        {
            Name = "BLR",
            SpaceId = hPEGLSPACE,
        });
    
        var bp = Hpegl.GetCaasClusterBlueprint.Invoke(new()
        {
            Name = "demo",
            SiteId = blr.Apply(getCaasSiteResult => getCaasSiteResult.Id),
        });
    
        var mbworker = Hpegl.GetCaasMachineBlueprint.Invoke(new()
        {
            Name = "standard-worker",
            SiteId = blr.Apply(getCaasSiteResult => getCaasSiteResult.Id),
        });
    
        var test = new Hpegl.CaasCluster("test", new()
        {
            BlueprintId = bp.Apply(getCaasClusterBlueprintResult => getCaasClusterBlueprintResult.Id),
            SiteId = blr.Apply(getCaasSiteResult => getCaasSiteResult.Id),
            SpaceId = hPEGLSPACE,
            KubernetesVersion = "",
            WorkerNodes = new[]
            {
                new Hpegl.Inputs.CaasClusterWorkerNodeArgs
                {
                    Name = "worker",
                    MachineBlueprintId = mbworker.Apply(getCaasMachineBlueprintResult => getCaasMachineBlueprintResult.Id),
                    MinSize = "",
                    MaxSize = "",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.hpegl.HpeglFunctions;
    import com.pulumi.hpegl.inputs.GetCaasSiteArgs;
    import com.pulumi.hpegl.inputs.GetCaasClusterBlueprintArgs;
    import com.pulumi.hpegl.inputs.GetCaasMachineBlueprintArgs;
    import com.pulumi.hpegl.CaasCluster;
    import com.pulumi.hpegl.CaasClusterArgs;
    import com.pulumi.hpegl.inputs.CaasClusterWorkerNodeArgs;
    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 hPEGLSPACE = config.get("hPEGLSPACE");
            final var blr = HpeglFunctions.getCaasSite(GetCaasSiteArgs.builder()
                .name("BLR")
                .spaceId(hPEGLSPACE)
                .build());
    
            final var bp = HpeglFunctions.getCaasClusterBlueprint(GetCaasClusterBlueprintArgs.builder()
                .name("demo")
                .siteId(blr.applyValue(getCaasSiteResult -> getCaasSiteResult.id()))
                .build());
    
            final var mbworker = HpeglFunctions.getCaasMachineBlueprint(GetCaasMachineBlueprintArgs.builder()
                .name("standard-worker")
                .siteId(blr.applyValue(getCaasSiteResult -> getCaasSiteResult.id()))
                .build());
    
            var test = new CaasCluster("test", CaasClusterArgs.builder()
                .blueprintId(bp.applyValue(getCaasClusterBlueprintResult -> getCaasClusterBlueprintResult.id()))
                .siteId(blr.applyValue(getCaasSiteResult -> getCaasSiteResult.id()))
                .spaceId(hPEGLSPACE)
                .kubernetesVersion("")
                .workerNodes(CaasClusterWorkerNodeArgs.builder()
                    .name("worker")
                    .machineBlueprintId(mbworker.applyValue(getCaasMachineBlueprintResult -> getCaasMachineBlueprintResult.id()))
                    .minSize("")
                    .maxSize("")
                    .build())
                .build());
    
        }
    }
    
    configuration:
      hPEGLSPACE:
        type: string
    resources:
      test:
        type: hpegl:CaasCluster
        properties:
          blueprintId: ${bp.id}
          siteId: ${blr.id}
          spaceId: ${hPEGLSPACE}
          kubernetesVersion: ""
          workerNodes:
            - name: worker
              machineBlueprintId: ${mbworker.id}
              minSize: ""
              maxSize: ""
    variables:
      blr:
        fn::invoke:
          function: hpegl:getCaasSite
          arguments:
            name: BLR
            spaceId: ${hPEGLSPACE}
      bp:
        fn::invoke:
          function: hpegl:getCaasClusterBlueprint
          arguments:
            name: demo
            siteId: ${blr.id}
      mbworker:
        fn::invoke:
          function: hpegl:getCaasMachineBlueprint
          arguments:
            name: standard-worker
            siteId: ${blr.id}
    

    Create CaasCluster Resource

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

    Constructor syntax

    new CaasCluster(name: string, args: CaasClusterArgs, opts?: CustomResourceOptions);
    @overload
    def CaasCluster(resource_name: str,
                    args: CaasClusterArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def CaasCluster(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    blueprint_id: Optional[str] = None,
                    site_id: Optional[str] = None,
                    space_id: Optional[str] = None,
                    caas_cluster_id: Optional[str] = None,
                    kubernetes_version: Optional[str] = None,
                    name: Optional[str] = None,
                    timeouts: Optional[CaasClusterTimeoutsArgs] = None,
                    worker_nodes: Optional[Sequence[CaasClusterWorkerNodeArgs]] = None)
    func NewCaasCluster(ctx *Context, name string, args CaasClusterArgs, opts ...ResourceOption) (*CaasCluster, error)
    public CaasCluster(string name, CaasClusterArgs args, CustomResourceOptions? opts = null)
    public CaasCluster(String name, CaasClusterArgs args)
    public CaasCluster(String name, CaasClusterArgs args, CustomResourceOptions options)
    
    type: hpegl:CaasCluster
    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 CaasClusterArgs
    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 CaasClusterArgs
    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 CaasClusterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CaasClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CaasClusterArgs
    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 caasClusterResource = new Hpegl.CaasCluster("caasClusterResource", new()
    {
        BlueprintId = "string",
        SiteId = "string",
        SpaceId = "string",
        CaasClusterId = "string",
        KubernetesVersion = "string",
        Name = "string",
        Timeouts = new Hpegl.Inputs.CaasClusterTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
        WorkerNodes = new[]
        {
            new Hpegl.Inputs.CaasClusterWorkerNodeArgs
            {
                MachineBlueprintId = "string",
                MaxSize = 0,
                MinSize = 0,
                Name = "string",
            },
        },
    });
    
    example, err := hpegl.NewCaasCluster(ctx, "caasClusterResource", &hpegl.CaasClusterArgs{
    	BlueprintId:       pulumi.String("string"),
    	SiteId:            pulumi.String("string"),
    	SpaceId:           pulumi.String("string"),
    	CaasClusterId:     pulumi.String("string"),
    	KubernetesVersion: pulumi.String("string"),
    	Name:              pulumi.String("string"),
    	Timeouts: &hpegl.CaasClusterTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    	WorkerNodes: hpegl.CaasClusterWorkerNodeArray{
    		&hpegl.CaasClusterWorkerNodeArgs{
    			MachineBlueprintId: pulumi.String("string"),
    			MaxSize:            pulumi.Float64(0),
    			MinSize:            pulumi.Float64(0),
    			Name:               pulumi.String("string"),
    		},
    	},
    })
    
    var caasClusterResource = new CaasCluster("caasClusterResource", CaasClusterArgs.builder()
        .blueprintId("string")
        .siteId("string")
        .spaceId("string")
        .caasClusterId("string")
        .kubernetesVersion("string")
        .name("string")
        .timeouts(CaasClusterTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .workerNodes(CaasClusterWorkerNodeArgs.builder()
            .machineBlueprintId("string")
            .maxSize(0)
            .minSize(0)
            .name("string")
            .build())
        .build());
    
    caas_cluster_resource = hpegl.CaasCluster("caasClusterResource",
        blueprint_id="string",
        site_id="string",
        space_id="string",
        caas_cluster_id="string",
        kubernetes_version="string",
        name="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        },
        worker_nodes=[{
            "machine_blueprint_id": "string",
            "max_size": 0,
            "min_size": 0,
            "name": "string",
        }])
    
    const caasClusterResource = new hpegl.CaasCluster("caasClusterResource", {
        blueprintId: "string",
        siteId: "string",
        spaceId: "string",
        caasClusterId: "string",
        kubernetesVersion: "string",
        name: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
        workerNodes: [{
            machineBlueprintId: "string",
            maxSize: 0,
            minSize: 0,
            name: "string",
        }],
    });
    
    type: hpegl:CaasCluster
    properties:
        blueprintId: string
        caasClusterId: string
        kubernetesVersion: string
        name: string
        siteId: string
        spaceId: string
        timeouts:
            create: string
            delete: string
            update: string
        workerNodes:
            - machineBlueprintId: string
              maxSize: 0
              minSize: 0
              name: string
    

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

    Outputs

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

    Look up Existing CaasCluster Resource

    Get an existing CaasCluster 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?: CaasClusterState, opts?: CustomResourceOptions): CaasCluster
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_endpoint: Optional[str] = None,
            appliance_name: Optional[str] = None,
            blueprint_id: Optional[str] = None,
            caas_cluster_id: Optional[str] = None,
            cluster_provider: Optional[str] = None,
            created_date: Optional[str] = None,
            default_machine_sets: Optional[Sequence[CaasClusterDefaultMachineSetArgs]] = None,
            default_machine_sets_details: Optional[Sequence[CaasClusterDefaultMachineSetsDetailArgs]] = None,
            default_storage_class: Optional[str] = None,
            default_storage_class_description: Optional[str] = None,
            health: Optional[str] = None,
            kubeconfig: Optional[str] = None,
            kubernetes_version: Optional[str] = None,
            last_update_date: Optional[str] = None,
            machine_sets: Optional[Sequence[CaasClusterMachineSetArgs]] = None,
            machine_sets_details: Optional[Sequence[CaasClusterMachineSetsDetailArgs]] = None,
            name: Optional[str] = None,
            service_endpoints: Optional[Sequence[CaasClusterServiceEndpointArgs]] = None,
            site_id: Optional[str] = None,
            space_id: Optional[str] = None,
            state: Optional[str] = None,
            timeouts: Optional[CaasClusterTimeoutsArgs] = None,
            worker_nodes: Optional[Sequence[CaasClusterWorkerNodeArgs]] = None) -> CaasCluster
    func GetCaasCluster(ctx *Context, name string, id IDInput, state *CaasClusterState, opts ...ResourceOption) (*CaasCluster, error)
    public static CaasCluster Get(string name, Input<string> id, CaasClusterState? state, CustomResourceOptions? opts = null)
    public static CaasCluster get(String name, Output<String> id, CaasClusterState state, CustomResourceOptions options)
    resources:  _:    type: hpegl:CaasCluster    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.
    The following state arguments are supported:

    Supporting Types

    CaasClusterDefaultMachineSet, CaasClusterDefaultMachineSetArgs

    MachineBlueprintId string
    MaxSize double
    MinSize double
    Name string
    MachineBlueprintId string
    MaxSize float64
    MinSize float64
    Name string
    machineBlueprintId String
    maxSize Double
    minSize Double
    name String
    machineBlueprintId string
    maxSize number
    minSize number
    name string
    machineBlueprintId String
    maxSize Number
    minSize Number
    name String

    CaasClusterDefaultMachineSetsDetail, CaasClusterDefaultMachineSetsDetailArgs

    CaasClusterDefaultMachineSetsDetailMachine, CaasClusterDefaultMachineSetsDetailMachineArgs

    CreatedDate string
    Health string
    Hostname string
    Id string
    LastUpdateDate string
    Name string
    State string
    CreatedDate string
    Health string
    Hostname string
    Id string
    LastUpdateDate string
    Name string
    State string
    createdDate String
    health String
    hostname String
    id String
    lastUpdateDate String
    name String
    state String
    createdDate string
    health string
    hostname string
    id string
    lastUpdateDate string
    name string
    state string
    createdDate String
    health String
    hostname String
    id String
    lastUpdateDate String
    name String
    state String

    CaasClusterDefaultMachineSetsDetailSizeDetail, CaasClusterDefaultMachineSetsDetailSizeDetailArgs

    Cpu double
    EphemeralDisk double
    Memory double
    Name string
    PersistentDisk double
    RootDisk double
    Cpu float64
    EphemeralDisk float64
    Memory float64
    Name string
    PersistentDisk float64
    RootDisk float64
    cpu Double
    ephemeralDisk Double
    memory Double
    name String
    persistentDisk Double
    rootDisk Double
    cpu number
    ephemeralDisk number
    memory number
    name string
    persistentDisk number
    rootDisk number
    cpu float
    ephemeral_disk float
    memory float
    name str
    persistent_disk float
    root_disk float
    cpu Number
    ephemeralDisk Number
    memory Number
    name String
    persistentDisk Number
    rootDisk Number

    CaasClusterMachineSet, CaasClusterMachineSetArgs

    MachineBlueprintId string
    MaxSize double
    MinSize double
    Name string
    MachineBlueprintId string
    MaxSize float64
    MinSize float64
    Name string
    machineBlueprintId String
    maxSize Double
    minSize Double
    name String
    machineBlueprintId string
    maxSize number
    minSize number
    name string
    machineBlueprintId String
    maxSize Number
    minSize Number
    name String

    CaasClusterMachineSetsDetail, CaasClusterMachineSetsDetailArgs

    CaasClusterMachineSetsDetailMachine, CaasClusterMachineSetsDetailMachineArgs

    CreatedDate string
    Health string
    Hostname string
    Id string
    LastUpdateDate string
    Name string
    State string
    CreatedDate string
    Health string
    Hostname string
    Id string
    LastUpdateDate string
    Name string
    State string
    createdDate String
    health String
    hostname String
    id String
    lastUpdateDate String
    name String
    state String
    createdDate string
    health string
    hostname string
    id string
    lastUpdateDate string
    name string
    state string
    createdDate String
    health String
    hostname String
    id String
    lastUpdateDate String
    name String
    state String

    CaasClusterMachineSetsDetailSizeDetail, CaasClusterMachineSetsDetailSizeDetailArgs

    Cpu double
    EphemeralDisk double
    Memory double
    Name string
    PersistentDisk double
    RootDisk double
    Cpu float64
    EphemeralDisk float64
    Memory float64
    Name string
    PersistentDisk float64
    RootDisk float64
    cpu Double
    ephemeralDisk Double
    memory Double
    name String
    persistentDisk Double
    rootDisk Double
    cpu number
    ephemeralDisk number
    memory number
    name string
    persistentDisk number
    rootDisk number
    cpu float
    ephemeral_disk float
    memory float
    name str
    persistent_disk float
    root_disk float
    cpu Number
    ephemeralDisk Number
    memory Number
    name String
    persistentDisk Number
    rootDisk Number

    CaasClusterServiceEndpoint, CaasClusterServiceEndpointArgs

    Endpoint string
    Name string
    Namespace string
    Type string
    Endpoint string
    Name string
    Namespace string
    Type string
    endpoint String
    name String
    namespace String
    type String
    endpoint string
    name string
    namespace string
    type string
    endpoint String
    name String
    namespace String
    type String

    CaasClusterTimeouts, CaasClusterTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    CaasClusterWorkerNode, CaasClusterWorkerNodeArgs

    MachineBlueprintId string
    MaxSize double
    MinSize double
    Name string
    MachineBlueprintId string
    MaxSize float64
    MinSize float64
    Name string
    machineBlueprintId String
    maxSize Double
    minSize Double
    name String
    machineBlueprintId string
    maxSize number
    minSize number
    name string
    machineBlueprintId String
    maxSize Number
    minSize Number
    name String

    Package Details

    Repository
    hpegl hpe/terraform-provider-hpegl
    License
    Notes
    This Pulumi package is based on the hpegl Terraform Provider.
    hpegl logo
    hpegl 0.4.18 published on Friday, Apr 18, 2025 by hpe