hpegl.CaasMachineBlueprint
Explore with Pulumi AI
The machine blueprint resource facilitates the creation and deletion of a CaaS machine blueprint. Update is currently not supported. The required inputs when creating a cluster blueprint are name, site-id, machine_provider, machine_roles, compute_type, size and storage_type
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 test = new hpegl.CaasMachineBlueprint("test", {
siteId: blr.then(blr => blr.id),
machineRoles: ["controlplane"],
machineProvider: "vmaas",
workerType: "",
computeType: "",
size: "",
storageType: "",
});
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)
test = hpegl.CaasMachineBlueprint("test",
site_id=blr.id,
machine_roles=["controlplane"],
machine_provider="vmaas",
worker_type="",
compute_type="",
size="",
storage_type="")
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.NewCaasMachineBlueprint(ctx, "test", &hpegl.CaasMachineBlueprintArgs{
SiteId: pulumi.String(blr.Id),
MachineRoles: pulumi.StringArray{
pulumi.String("controlplane"),
},
MachineProvider: pulumi.String("vmaas"),
WorkerType: pulumi.String(""),
ComputeType: pulumi.String(""),
Size: pulumi.String(""),
StorageType: pulumi.String(""),
})
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 test = new Hpegl.CaasMachineBlueprint("test", new()
{
SiteId = blr.Apply(getCaasSiteResult => getCaasSiteResult.Id),
MachineRoles = new[]
{
"controlplane",
},
MachineProvider = "vmaas",
WorkerType = "",
ComputeType = "",
Size = "",
StorageType = "",
});
});
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.CaasMachineBlueprint;
import com.pulumi.hpegl.CaasMachineBlueprintArgs;
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());
var test = new CaasMachineBlueprint("test", CaasMachineBlueprintArgs.builder()
.siteId(blr.applyValue(getCaasSiteResult -> getCaasSiteResult.id()))
.machineRoles("controlplane")
.machineProvider("vmaas")
.workerType("")
.computeType("")
.size("")
.storageType("")
.build());
}
}
configuration:
hPEGLSPACE:
type: string
resources:
test:
type: hpegl:CaasMachineBlueprint
properties:
siteId: ${blr.id}
machineRoles:
- controlplane
machineProvider: vmaas
workerType: ""
computeType: ""
size: ""
storageType: ""
variables:
blr:
fn::invoke:
function: hpegl:getCaasSite
arguments:
name: BLR
spaceId: ${hPEGLSPACE}
Create CaasMachineBlueprint Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CaasMachineBlueprint(name: string, args: CaasMachineBlueprintArgs, opts?: CustomResourceOptions);
@overload
def CaasMachineBlueprint(resource_name: str,
args: CaasMachineBlueprintArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CaasMachineBlueprint(resource_name: str,
opts: Optional[ResourceOptions] = None,
compute_type: Optional[str] = None,
machine_provider: Optional[str] = None,
machine_roles: Optional[Sequence[str]] = None,
site_id: Optional[str] = None,
size: Optional[str] = None,
storage_type: Optional[str] = None,
worker_type: Optional[str] = None,
caas_machine_blueprint_id: Optional[str] = None,
name: Optional[str] = None)
func NewCaasMachineBlueprint(ctx *Context, name string, args CaasMachineBlueprintArgs, opts ...ResourceOption) (*CaasMachineBlueprint, error)
public CaasMachineBlueprint(string name, CaasMachineBlueprintArgs args, CustomResourceOptions? opts = null)
public CaasMachineBlueprint(String name, CaasMachineBlueprintArgs args)
public CaasMachineBlueprint(String name, CaasMachineBlueprintArgs args, CustomResourceOptions options)
type: hpegl:CaasMachineBlueprint
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 CaasMachineBlueprintArgs
- 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 CaasMachineBlueprintArgs
- 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 CaasMachineBlueprintArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CaasMachineBlueprintArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CaasMachineBlueprintArgs
- 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 caasMachineBlueprintResource = new Hpegl.CaasMachineBlueprint("caasMachineBlueprintResource", new()
{
ComputeType = "string",
MachineProvider = "string",
MachineRoles = new[]
{
"string",
},
SiteId = "string",
Size = "string",
StorageType = "string",
WorkerType = "string",
CaasMachineBlueprintId = "string",
Name = "string",
});
example, err := hpegl.NewCaasMachineBlueprint(ctx, "caasMachineBlueprintResource", &hpegl.CaasMachineBlueprintArgs{
ComputeType: pulumi.String("string"),
MachineProvider: pulumi.String("string"),
MachineRoles: pulumi.StringArray{
pulumi.String("string"),
},
SiteId: pulumi.String("string"),
Size: pulumi.String("string"),
StorageType: pulumi.String("string"),
WorkerType: pulumi.String("string"),
CaasMachineBlueprintId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var caasMachineBlueprintResource = new CaasMachineBlueprint("caasMachineBlueprintResource", CaasMachineBlueprintArgs.builder()
.computeType("string")
.machineProvider("string")
.machineRoles("string")
.siteId("string")
.size("string")
.storageType("string")
.workerType("string")
.caasMachineBlueprintId("string")
.name("string")
.build());
caas_machine_blueprint_resource = hpegl.CaasMachineBlueprint("caasMachineBlueprintResource",
compute_type="string",
machine_provider="string",
machine_roles=["string"],
site_id="string",
size="string",
storage_type="string",
worker_type="string",
caas_machine_blueprint_id="string",
name="string")
const caasMachineBlueprintResource = new hpegl.CaasMachineBlueprint("caasMachineBlueprintResource", {
computeType: "string",
machineProvider: "string",
machineRoles: ["string"],
siteId: "string",
size: "string",
storageType: "string",
workerType: "string",
caasMachineBlueprintId: "string",
name: "string",
});
type: hpegl:CaasMachineBlueprint
properties:
caasMachineBlueprintId: string
computeType: string
machineProvider: string
machineRoles:
- string
name: string
siteId: string
size: string
storageType: string
workerType: string
CaasMachineBlueprint 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 CaasMachineBlueprint resource accepts the following input properties:
- Compute
Type string - Machine
Provider string - Machine
Roles List<string> - Site
Id string - Size string
- Storage
Type string - Worker
Type string - Caas
Machine stringBlueprint Id - The ID of this resource.
- Name string
- Compute
Type string - Machine
Provider string - Machine
Roles []string - Site
Id string - Size string
- Storage
Type string - Worker
Type string - Caas
Machine stringBlueprint Id - The ID of this resource.
- Name string
- compute
Type String - machine
Provider String - machine
Roles List<String> - site
Id String - size String
- storage
Type String - worker
Type String - caas
Machine StringBlueprint Id - The ID of this resource.
- name String
- compute
Type string - machine
Provider string - machine
Roles string[] - site
Id string - size string
- storage
Type string - worker
Type string - caas
Machine stringBlueprint Id - The ID of this resource.
- name string
- compute_
type str - machine_
provider str - machine_
roles Sequence[str] - site_
id str - size str
- storage_
type str - worker_
type str - caas_
machine_ strblueprint_ id - The ID of this resource.
- name str
- compute
Type String - machine
Provider String - machine
Roles List<String> - site
Id String - size String
- storage
Type String - worker
Type String - caas
Machine StringBlueprint Id - The ID of this resource.
- name String
Outputs
All input properties are implicitly available as output properties. Additionally, the CaasMachineBlueprint resource produces the following output properties:
- Created
Date string - Id string
- The provider-assigned unique ID for this managed resource.
- Last
Update stringDate - Size
Details List<CaasMachine Blueprint Size Detail>
- Created
Date string - Id string
- The provider-assigned unique ID for this managed resource.
- Last
Update stringDate - Size
Details []CaasMachine Blueprint Size Detail
- created
Date String - id String
- The provider-assigned unique ID for this managed resource.
- last
Update StringDate - size
Details List<CaasMachine Blueprint Size Detail>
- created
Date string - id string
- The provider-assigned unique ID for this managed resource.
- last
Update stringDate - size
Details CaasMachine Blueprint Size Detail[]
- created_
date str - id str
- The provider-assigned unique ID for this managed resource.
- last_
update_ strdate - size_
details Sequence[CaasMachine Blueprint Size Detail]
- created
Date String - id String
- The provider-assigned unique ID for this managed resource.
- last
Update StringDate - size
Details List<Property Map>
Look up Existing CaasMachineBlueprint Resource
Get an existing CaasMachineBlueprint 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?: CaasMachineBlueprintState, opts?: CustomResourceOptions): CaasMachineBlueprint
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
caas_machine_blueprint_id: Optional[str] = None,
compute_type: Optional[str] = None,
created_date: Optional[str] = None,
last_update_date: Optional[str] = None,
machine_provider: Optional[str] = None,
machine_roles: Optional[Sequence[str]] = None,
name: Optional[str] = None,
site_id: Optional[str] = None,
size: Optional[str] = None,
size_details: Optional[Sequence[CaasMachineBlueprintSizeDetailArgs]] = None,
storage_type: Optional[str] = None,
worker_type: Optional[str] = None) -> CaasMachineBlueprint
func GetCaasMachineBlueprint(ctx *Context, name string, id IDInput, state *CaasMachineBlueprintState, opts ...ResourceOption) (*CaasMachineBlueprint, error)
public static CaasMachineBlueprint Get(string name, Input<string> id, CaasMachineBlueprintState? state, CustomResourceOptions? opts = null)
public static CaasMachineBlueprint get(String name, Output<String> id, CaasMachineBlueprintState state, CustomResourceOptions options)
resources: _: type: hpegl:CaasMachineBlueprint 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.
- Caas
Machine stringBlueprint Id - The ID of this resource.
- Compute
Type string - Created
Date string - Last
Update stringDate - Machine
Provider string - Machine
Roles List<string> - Name string
- Site
Id string - Size string
- Size
Details List<CaasMachine Blueprint Size Detail> - Storage
Type string - Worker
Type string
- Caas
Machine stringBlueprint Id - The ID of this resource.
- Compute
Type string - Created
Date string - Last
Update stringDate - Machine
Provider string - Machine
Roles []string - Name string
- Site
Id string - Size string
- Size
Details []CaasMachine Blueprint Size Detail Args - Storage
Type string - Worker
Type string
- caas
Machine StringBlueprint Id - The ID of this resource.
- compute
Type String - created
Date String - last
Update StringDate - machine
Provider String - machine
Roles List<String> - name String
- site
Id String - size String
- size
Details List<CaasMachine Blueprint Size Detail> - storage
Type String - worker
Type String
- caas
Machine stringBlueprint Id - The ID of this resource.
- compute
Type string - created
Date string - last
Update stringDate - machine
Provider string - machine
Roles string[] - name string
- site
Id string - size string
- size
Details CaasMachine Blueprint Size Detail[] - storage
Type string - worker
Type string
- caas_
machine_ strblueprint_ id - The ID of this resource.
- compute_
type str - created_
date str - last_
update_ strdate - machine_
provider str - machine_
roles Sequence[str] - name str
- site_
id str - size str
- size_
details Sequence[CaasMachine Blueprint Size Detail Args] - storage_
type str - worker_
type str
- caas
Machine StringBlueprint Id - The ID of this resource.
- compute
Type String - created
Date String - last
Update StringDate - machine
Provider String - machine
Roles List<String> - name String
- site
Id String - size String
- size
Details List<Property Map> - storage
Type String - worker
Type String
Supporting Types
CaasMachineBlueprintSizeDetail, CaasMachineBlueprintSizeDetailArgs
- Cpu double
- Ephemeral
Disk double - Memory double
- Name string
- Persistent
Disk double - Root
Disk double
- Cpu float64
- Ephemeral
Disk float64 - Memory float64
- Name string
- Persistent
Disk float64 - Root
Disk float64
- cpu Double
- ephemeral
Disk Double - memory Double
- name String
- persistent
Disk Double - root
Disk Double
- cpu number
- ephemeral
Disk number - memory number
- name string
- persistent
Disk number - root
Disk number
- cpu float
- ephemeral_
disk float - memory float
- name str
- persistent_
disk float - root_
disk float
- cpu Number
- ephemeral
Disk Number - memory Number
- name String
- persistent
Disk Number - root
Disk Number
Package Details
- Repository
- hpegl hpe/terraform-provider-hpegl
- License
- Notes
- This Pulumi package is based on the
hpegl
Terraform Provider.