hpegl.CaasClusterBlueprint
Explore with Pulumi AI
The cluster blueprint resource facilitates the creation and deletion of a CaaS cluster blueprint. Update is currently not supported. The required inputs when creating a cluster blueprint are name, kubernetes_version, site-id, cluster_provider, control_plane, worker_nodes and default_storage_class
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 mbcontrolplane = blr.then(blr => hpegl.getCaasMachineBlueprint({
    name: "standard-master",
    siteId: blr.id,
}));
const mbworker = blr.then(blr => hpegl.getCaasMachineBlueprint({
    name: "standard-worker",
    siteId: blr.id,
}));
const clusterprovider = blr.then(blr => hpegl.getCaasClusterProvider({
    name: "ecp",
    siteId: blr.id,
}));
const testbp = new hpegl.CaasClusterBlueprint("testbp", {
    kubernetesVersion: clusterprovider.then(clusterprovider => clusterprovider.kubernetesVersions?.[0]),
    defaultStorageClass: "",
    siteId: blr.then(blr => blr.id),
    clusterProvider: "",
    controlPlaneCount: "",
    workerNodes: [
        {
            name: "",
            machineBlueprintId: mbworker.then(mbworker => mbworker.id),
            minSize: "",
            maxSize: "",
        },
        {
            name: "",
            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)
mbcontrolplane = hpegl.get_caas_machine_blueprint(name="standard-master",
    site_id=blr.id)
mbworker = hpegl.get_caas_machine_blueprint(name="standard-worker",
    site_id=blr.id)
clusterprovider = hpegl.get_caas_cluster_provider(name="ecp",
    site_id=blr.id)
testbp = hpegl.CaasClusterBlueprint("testbp",
    kubernetes_version=clusterprovider.kubernetes_versions[0],
    default_storage_class="",
    site_id=blr.id,
    cluster_provider="",
    control_plane_count="",
    worker_nodes=[
        {
            "name": "",
            "machine_blueprint_id": mbworker.id,
            "min_size": "",
            "max_size": "",
        },
        {
            "name": "",
            "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
		}
		_, err = hpegl.LookupCaasMachineBlueprint(ctx, &hpegl.LookupCaasMachineBlueprintArgs{
			Name:   "standard-master",
			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
		}
		clusterprovider, err := hpegl.GetCaasClusterProvider(ctx, &hpegl.GetCaasClusterProviderArgs{
			Name:   "ecp",
			SiteId: blr.Id,
		}, nil)
		if err != nil {
			return err
		}
		_, err = hpegl.NewCaasClusterBlueprint(ctx, "testbp", &hpegl.CaasClusterBlueprintArgs{
			KubernetesVersion:   pulumi.String(clusterprovider.KubernetesVersions[0]),
			DefaultStorageClass: pulumi.String(""),
			SiteId:              pulumi.String(blr.Id),
			ClusterProvider:     pulumi.String(""),
			ControlPlaneCount:   pulumi.Float64(""),
			WorkerNodes: hpegl.CaasClusterBlueprintWorkerNodeArray{
				&hpegl.CaasClusterBlueprintWorkerNodeArgs{
					Name:               pulumi.String(""),
					MachineBlueprintId: pulumi.String(mbworker.Id),
					MinSize:            pulumi.Float64(""),
					MaxSize:            pulumi.Float64(""),
				},
				&hpegl.CaasClusterBlueprintWorkerNodeArgs{
					Name:               pulumi.String(""),
					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 mbcontrolplane = Hpegl.GetCaasMachineBlueprint.Invoke(new()
    {
        Name = "standard-master",
        SiteId = blr.Apply(getCaasSiteResult => getCaasSiteResult.Id),
    });
    var mbworker = Hpegl.GetCaasMachineBlueprint.Invoke(new()
    {
        Name = "standard-worker",
        SiteId = blr.Apply(getCaasSiteResult => getCaasSiteResult.Id),
    });
    var clusterprovider = Hpegl.GetCaasClusterProvider.Invoke(new()
    {
        Name = "ecp",
        SiteId = blr.Apply(getCaasSiteResult => getCaasSiteResult.Id),
    });
    var testbp = new Hpegl.CaasClusterBlueprint("testbp", new()
    {
        KubernetesVersion = clusterprovider.Apply(getCaasClusterProviderResult => getCaasClusterProviderResult.KubernetesVersions[0]),
        DefaultStorageClass = "",
        SiteId = blr.Apply(getCaasSiteResult => getCaasSiteResult.Id),
        ClusterProvider = "",
        ControlPlaneCount = "",
        WorkerNodes = new[]
        {
            new Hpegl.Inputs.CaasClusterBlueprintWorkerNodeArgs
            {
                Name = "",
                MachineBlueprintId = mbworker.Apply(getCaasMachineBlueprintResult => getCaasMachineBlueprintResult.Id),
                MinSize = "",
                MaxSize = "",
            },
            new Hpegl.Inputs.CaasClusterBlueprintWorkerNodeArgs
            {
                Name = "",
                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.GetCaasMachineBlueprintArgs;
import com.pulumi.hpegl.inputs.GetCaasClusterProviderArgs;
import com.pulumi.hpegl.CaasClusterBlueprint;
import com.pulumi.hpegl.CaasClusterBlueprintArgs;
import com.pulumi.hpegl.inputs.CaasClusterBlueprintWorkerNodeArgs;
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 mbcontrolplane = HpeglFunctions.getCaasMachineBlueprint(GetCaasMachineBlueprintArgs.builder()
            .name("standard-master")
            .siteId(blr.applyValue(getCaasSiteResult -> getCaasSiteResult.id()))
            .build());
        final var mbworker = HpeglFunctions.getCaasMachineBlueprint(GetCaasMachineBlueprintArgs.builder()
            .name("standard-worker")
            .siteId(blr.applyValue(getCaasSiteResult -> getCaasSiteResult.id()))
            .build());
        final var clusterprovider = HpeglFunctions.getCaasClusterProvider(GetCaasClusterProviderArgs.builder()
            .name("ecp")
            .siteId(blr.applyValue(getCaasSiteResult -> getCaasSiteResult.id()))
            .build());
        var testbp = new CaasClusterBlueprint("testbp", CaasClusterBlueprintArgs.builder()
            .kubernetesVersion(clusterprovider.applyValue(getCaasClusterProviderResult -> getCaasClusterProviderResult.kubernetesVersions()[0]))
            .defaultStorageClass("")
            .siteId(blr.applyValue(getCaasSiteResult -> getCaasSiteResult.id()))
            .clusterProvider("")
            .controlPlaneCount("")
            .workerNodes(            
                CaasClusterBlueprintWorkerNodeArgs.builder()
                    .name("")
                    .machineBlueprintId(mbworker.applyValue(getCaasMachineBlueprintResult -> getCaasMachineBlueprintResult.id()))
                    .minSize("")
                    .maxSize("")
                    .build(),
                CaasClusterBlueprintWorkerNodeArgs.builder()
                    .name("")
                    .machineBlueprintId(mbworker.applyValue(getCaasMachineBlueprintResult -> getCaasMachineBlueprintResult.id()))
                    .minSize("")
                    .maxSize("")
                    .build())
            .build());
    }
}
configuration:
  hPEGLSPACE:
    type: string
resources:
  testbp:
    type: hpegl:CaasClusterBlueprint
    properties:
      kubernetesVersion: ${clusterprovider.kubernetesVersions[0]}
      defaultStorageClass: ""
      siteId: ${blr.id}
      clusterProvider: ""
      controlPlaneCount: ""
      workerNodes:
        - name: ""
          machineBlueprintId: ${mbworker.id}
          minSize: ""
          maxSize: ""
        - name: ""
          machineBlueprintId: ${mbworker.id}
          minSize: ""
          maxSize: ""
variables:
  blr:
    fn::invoke:
      function: hpegl:getCaasSite
      arguments:
        name: BLR
        spaceId: ${hPEGLSPACE}
  mbcontrolplane:
    fn::invoke:
      function: hpegl:getCaasMachineBlueprint
      arguments:
        name: standard-master
        siteId: ${blr.id}
  mbworker:
    fn::invoke:
      function: hpegl:getCaasMachineBlueprint
      arguments:
        name: standard-worker
        siteId: ${blr.id}
  clusterprovider:
    fn::invoke:
      function: hpegl:getCaasClusterProvider
      arguments:
        name: ecp
        siteId: ${blr.id}
Create CaasClusterBlueprint Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CaasClusterBlueprint(name: string, args: CaasClusterBlueprintArgs, opts?: CustomResourceOptions);@overload
def CaasClusterBlueprint(resource_name: str,
                         args: CaasClusterBlueprintArgs,
                         opts: Optional[ResourceOptions] = None)
@overload
def CaasClusterBlueprint(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         cluster_provider: Optional[str] = None,
                         control_plane_count: Optional[float] = None,
                         default_storage_class: Optional[str] = None,
                         kubernetes_version: Optional[str] = None,
                         site_id: Optional[str] = None,
                         worker_nodes: Optional[Sequence[CaasClusterBlueprintWorkerNodeArgs]] = None,
                         caas_cluster_blueprint_id: Optional[str] = None,
                         name: Optional[str] = None)func NewCaasClusterBlueprint(ctx *Context, name string, args CaasClusterBlueprintArgs, opts ...ResourceOption) (*CaasClusterBlueprint, error)public CaasClusterBlueprint(string name, CaasClusterBlueprintArgs args, CustomResourceOptions? opts = null)
public CaasClusterBlueprint(String name, CaasClusterBlueprintArgs args)
public CaasClusterBlueprint(String name, CaasClusterBlueprintArgs args, CustomResourceOptions options)
type: hpegl:CaasClusterBlueprint
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 CaasClusterBlueprintArgs
- 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 CaasClusterBlueprintArgs
- 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 CaasClusterBlueprintArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CaasClusterBlueprintArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CaasClusterBlueprintArgs
- 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 caasClusterBlueprintResource = new Hpegl.CaasClusterBlueprint("caasClusterBlueprintResource", new()
{
    ClusterProvider = "string",
    ControlPlaneCount = 0,
    DefaultStorageClass = "string",
    KubernetesVersion = "string",
    SiteId = "string",
    WorkerNodes = new[]
    {
        new Hpegl.Inputs.CaasClusterBlueprintWorkerNodeArgs
        {
            MachineBlueprintId = "string",
            MaxSize = 0,
            MinSize = 0,
            Name = "string",
        },
    },
    CaasClusterBlueprintId = "string",
    Name = "string",
});
example, err := hpegl.NewCaasClusterBlueprint(ctx, "caasClusterBlueprintResource", &hpegl.CaasClusterBlueprintArgs{
	ClusterProvider:     pulumi.String("string"),
	ControlPlaneCount:   pulumi.Float64(0),
	DefaultStorageClass: pulumi.String("string"),
	KubernetesVersion:   pulumi.String("string"),
	SiteId:              pulumi.String("string"),
	WorkerNodes: hpegl.CaasClusterBlueprintWorkerNodeArray{
		&hpegl.CaasClusterBlueprintWorkerNodeArgs{
			MachineBlueprintId: pulumi.String("string"),
			MaxSize:            pulumi.Float64(0),
			MinSize:            pulumi.Float64(0),
			Name:               pulumi.String("string"),
		},
	},
	CaasClusterBlueprintId: pulumi.String("string"),
	Name:                   pulumi.String("string"),
})
var caasClusterBlueprintResource = new CaasClusterBlueprint("caasClusterBlueprintResource", CaasClusterBlueprintArgs.builder()
    .clusterProvider("string")
    .controlPlaneCount(0.0)
    .defaultStorageClass("string")
    .kubernetesVersion("string")
    .siteId("string")
    .workerNodes(CaasClusterBlueprintWorkerNodeArgs.builder()
        .machineBlueprintId("string")
        .maxSize(0.0)
        .minSize(0.0)
        .name("string")
        .build())
    .caasClusterBlueprintId("string")
    .name("string")
    .build());
caas_cluster_blueprint_resource = hpegl.CaasClusterBlueprint("caasClusterBlueprintResource",
    cluster_provider="string",
    control_plane_count=0,
    default_storage_class="string",
    kubernetes_version="string",
    site_id="string",
    worker_nodes=[{
        "machine_blueprint_id": "string",
        "max_size": 0,
        "min_size": 0,
        "name": "string",
    }],
    caas_cluster_blueprint_id="string",
    name="string")
const caasClusterBlueprintResource = new hpegl.CaasClusterBlueprint("caasClusterBlueprintResource", {
    clusterProvider: "string",
    controlPlaneCount: 0,
    defaultStorageClass: "string",
    kubernetesVersion: "string",
    siteId: "string",
    workerNodes: [{
        machineBlueprintId: "string",
        maxSize: 0,
        minSize: 0,
        name: "string",
    }],
    caasClusterBlueprintId: "string",
    name: "string",
});
type: hpegl:CaasClusterBlueprint
properties:
    caasClusterBlueprintId: string
    clusterProvider: string
    controlPlaneCount: 0
    defaultStorageClass: string
    kubernetesVersion: string
    name: string
    siteId: string
    workerNodes:
        - machineBlueprintId: string
          maxSize: 0
          minSize: 0
          name: string
CaasClusterBlueprint 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 CaasClusterBlueprint resource accepts the following input properties:
- ClusterProvider string
- ControlPlane doubleCount 
- DefaultStorage stringClass 
- KubernetesVersion string
- SiteId string
- WorkerNodes List<CaasCluster Blueprint Worker Node> 
- CaasCluster stringBlueprint Id 
- The ID of this resource.
- Name string
- ClusterProvider string
- ControlPlane float64Count 
- DefaultStorage stringClass 
- KubernetesVersion string
- SiteId string
- WorkerNodes []CaasCluster Blueprint Worker Node Args 
- CaasCluster stringBlueprint Id 
- The ID of this resource.
- Name string
- clusterProvider String
- controlPlane DoubleCount 
- defaultStorage StringClass 
- kubernetesVersion String
- siteId String
- workerNodes List<CaasCluster Blueprint Worker Node> 
- caasCluster StringBlueprint Id 
- The ID of this resource.
- name String
- clusterProvider string
- controlPlane numberCount 
- defaultStorage stringClass 
- kubernetesVersion string
- siteId string
- workerNodes CaasCluster Blueprint Worker Node[] 
- caasCluster stringBlueprint Id 
- The ID of this resource.
- name string
- cluster_provider str
- control_plane_ floatcount 
- default_storage_ strclass 
- kubernetes_version str
- site_id str
- worker_nodes Sequence[CaasCluster Blueprint Worker Node Args] 
- caas_cluster_ strblueprint_ id 
- The ID of this resource.
- name str
- clusterProvider String
- controlPlane NumberCount 
- defaultStorage StringClass 
- kubernetesVersion String
- siteId String
- workerNodes List<Property Map>
- caasCluster StringBlueprint Id 
- The ID of this resource.
- name String
Outputs
All input properties are implicitly available as output properties. Additionally, the CaasClusterBlueprint 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 CaasClusterBlueprint Resource
Get an existing CaasClusterBlueprint 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?: CaasClusterBlueprintState, opts?: CustomResourceOptions): CaasClusterBlueprint@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        caas_cluster_blueprint_id: Optional[str] = None,
        cluster_provider: Optional[str] = None,
        control_plane_count: Optional[float] = None,
        default_storage_class: Optional[str] = None,
        kubernetes_version: Optional[str] = None,
        name: Optional[str] = None,
        site_id: Optional[str] = None,
        worker_nodes: Optional[Sequence[CaasClusterBlueprintWorkerNodeArgs]] = None) -> CaasClusterBlueprintfunc GetCaasClusterBlueprint(ctx *Context, name string, id IDInput, state *CaasClusterBlueprintState, opts ...ResourceOption) (*CaasClusterBlueprint, error)public static CaasClusterBlueprint Get(string name, Input<string> id, CaasClusterBlueprintState? state, CustomResourceOptions? opts = null)public static CaasClusterBlueprint get(String name, Output<String> id, CaasClusterBlueprintState state, CustomResourceOptions options)resources:  _:    type: hpegl:CaasClusterBlueprint    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.
- CaasCluster stringBlueprint Id 
- The ID of this resource.
- ClusterProvider string
- ControlPlane doubleCount 
- DefaultStorage stringClass 
- KubernetesVersion string
- Name string
- SiteId string
- WorkerNodes List<CaasCluster Blueprint Worker Node> 
- CaasCluster stringBlueprint Id 
- The ID of this resource.
- ClusterProvider string
- ControlPlane float64Count 
- DefaultStorage stringClass 
- KubernetesVersion string
- Name string
- SiteId string
- WorkerNodes []CaasCluster Blueprint Worker Node Args 
- caasCluster StringBlueprint Id 
- The ID of this resource.
- clusterProvider String
- controlPlane DoubleCount 
- defaultStorage StringClass 
- kubernetesVersion String
- name String
- siteId String
- workerNodes List<CaasCluster Blueprint Worker Node> 
- caasCluster stringBlueprint Id 
- The ID of this resource.
- clusterProvider string
- controlPlane numberCount 
- defaultStorage stringClass 
- kubernetesVersion string
- name string
- siteId string
- workerNodes CaasCluster Blueprint Worker Node[] 
- caas_cluster_ strblueprint_ id 
- The ID of this resource.
- cluster_provider str
- control_plane_ floatcount 
- default_storage_ strclass 
- kubernetes_version str
- name str
- site_id str
- worker_nodes Sequence[CaasCluster Blueprint Worker Node Args] 
- caasCluster StringBlueprint Id 
- The ID of this resource.
- clusterProvider String
- controlPlane NumberCount 
- defaultStorage StringClass 
- kubernetesVersion String
- name String
- siteId String
- workerNodes List<Property Map>
Supporting Types
CaasClusterBlueprintWorkerNode, CaasClusterBlueprintWorkerNodeArgs          
- MachineBlueprint stringId 
- MaxSize double
- MinSize double
- Name string
- MachineBlueprint stringId 
- MaxSize float64
- MinSize float64
- Name string
- machineBlueprint StringId 
- maxSize Double
- minSize Double
- name String
- machineBlueprint stringId 
- maxSize number
- minSize number
- name string
- machine_blueprint_ strid 
- max_size float
- min_size float
- name str
- machineBlueprint StringId 
- maxSize Number
- minSize Number
- name String
Package Details
- Repository
- hpegl hpe/terraform-provider-hpegl
- License
- Notes
- This Pulumi package is based on the hpeglTerraform Provider.