1. Packages
  2. OVH
  3. API Docs
  4. Me
  5. InstallationTemplatePartitionSchemeHardwareRaid
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

ovh.Me.InstallationTemplatePartitionSchemeHardwareRaid

Explore with Pulumi AI

ovh logo
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

    Use this resource to create a hardware raid group in the partition scheme of a custom installation template available for dedicated servers.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const mytemplate = new ovh.me.InstallationTemplate("mytemplate", {
        baseTemplateName: "debian12_64",
        templateName: "mytemplate",
    });
    const scheme = new ovh.me.InstallationTemplatePartitionScheme("scheme", {
        templateName: mytemplate.templateName,
        priority: 1,
    });
    const group1 = new ovh.me.InstallationTemplatePartitionSchemeHardwareRaid("group1", {
        templateName: scheme.templateName,
        schemeName: scheme.name,
        disks: [
            "[c1:d1,c1:d2,c1:d3]",
            "[c1:d10,c1:d20,c1:d30]",
        ],
        mode: "raid50",
        step: 1,
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    mytemplate = ovh.me.InstallationTemplate("mytemplate",
        base_template_name="debian12_64",
        template_name="mytemplate")
    scheme = ovh.me.InstallationTemplatePartitionScheme("scheme",
        template_name=mytemplate.template_name,
        priority=1)
    group1 = ovh.me.InstallationTemplatePartitionSchemeHardwareRaid("group1",
        template_name=scheme.template_name,
        scheme_name=scheme.name,
        disks=[
            "[c1:d1,c1:d2,c1:d3]",
            "[c1:d10,c1:d20,c1:d30]",
        ],
        mode="raid50",
        step=1)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/Me"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		mytemplate, err := Me.NewInstallationTemplate(ctx, "mytemplate", &Me.InstallationTemplateArgs{
    			BaseTemplateName: pulumi.String("debian12_64"),
    			TemplateName:     pulumi.String("mytemplate"),
    		})
    		if err != nil {
    			return err
    		}
    		scheme, err := Me.NewInstallationTemplatePartitionScheme(ctx, "scheme", &Me.InstallationTemplatePartitionSchemeArgs{
    			TemplateName: mytemplate.TemplateName,
    			Priority:     pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = Me.NewInstallationTemplatePartitionSchemeHardwareRaid(ctx, "group1", &Me.InstallationTemplatePartitionSchemeHardwareRaidArgs{
    			TemplateName: scheme.TemplateName,
    			SchemeName:   scheme.Name,
    			Disks: pulumi.StringArray{
    				pulumi.String("[c1:d1,c1:d2,c1:d3]"),
    				pulumi.String("[c1:d10,c1:d20,c1:d30]"),
    			},
    			Mode: pulumi.String("raid50"),
    			Step: pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var mytemplate = new Ovh.Me.InstallationTemplate("mytemplate", new()
        {
            BaseTemplateName = "debian12_64",
            TemplateName = "mytemplate",
        });
    
        var scheme = new Ovh.Me.InstallationTemplatePartitionScheme("scheme", new()
        {
            TemplateName = mytemplate.TemplateName,
            Priority = 1,
        });
    
        var group1 = new Ovh.Me.InstallationTemplatePartitionSchemeHardwareRaid("group1", new()
        {
            TemplateName = scheme.TemplateName,
            SchemeName = scheme.Name,
            Disks = new[]
            {
                "[c1:d1,c1:d2,c1:d3]",
                "[c1:d10,c1:d20,c1:d30]",
            },
            Mode = "raid50",
            Step = 1,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.Me.InstallationTemplate;
    import com.pulumi.ovh.Me.InstallationTemplateArgs;
    import com.pulumi.ovh.Me.InstallationTemplatePartitionScheme;
    import com.pulumi.ovh.Me.InstallationTemplatePartitionSchemeArgs;
    import com.pulumi.ovh.Me.InstallationTemplatePartitionSchemeHardwareRaid;
    import com.pulumi.ovh.Me.InstallationTemplatePartitionSchemeHardwareRaidArgs;
    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) {
            var mytemplate = new InstallationTemplate("mytemplate", InstallationTemplateArgs.builder()
                .baseTemplateName("debian12_64")
                .templateName("mytemplate")
                .build());
    
            var scheme = new InstallationTemplatePartitionScheme("scheme", InstallationTemplatePartitionSchemeArgs.builder()
                .templateName(mytemplate.templateName())
                .priority(1)
                .build());
    
            var group1 = new InstallationTemplatePartitionSchemeHardwareRaid("group1", InstallationTemplatePartitionSchemeHardwareRaidArgs.builder()
                .templateName(scheme.templateName())
                .schemeName(scheme.name())
                .disks(            
                    "[c1:d1,c1:d2,c1:d3]",
                    "[c1:d10,c1:d20,c1:d30]")
                .mode("raid50")
                .step(1)
                .build());
    
        }
    }
    
    resources:
      mytemplate:
        type: ovh:Me:InstallationTemplate
        properties:
          baseTemplateName: debian12_64
          templateName: mytemplate
      scheme:
        type: ovh:Me:InstallationTemplatePartitionScheme
        properties:
          templateName: ${mytemplate.templateName}
          priority: 1
      group1:
        type: ovh:Me:InstallationTemplatePartitionSchemeHardwareRaid
        properties:
          templateName: ${scheme.templateName}
          schemeName: ${scheme.name}
          disks:
            - '[c1:d1,c1:d2,c1:d3]'
            - '[c1:d10,c1:d20,c1:d30]'
          mode: raid50
          step: 1
    

    Create InstallationTemplatePartitionSchemeHardwareRaid Resource

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

    Constructor syntax

    new InstallationTemplatePartitionSchemeHardwareRaid(name: string, args: InstallationTemplatePartitionSchemeHardwareRaidArgs, opts?: CustomResourceOptions);
    @overload
    def InstallationTemplatePartitionSchemeHardwareRaid(resource_name: str,
                                                        args: InstallationTemplatePartitionSchemeHardwareRaidArgs,
                                                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def InstallationTemplatePartitionSchemeHardwareRaid(resource_name: str,
                                                        opts: Optional[ResourceOptions] = None,
                                                        disks: Optional[Sequence[str]] = None,
                                                        mode: Optional[str] = None,
                                                        scheme_name: Optional[str] = None,
                                                        step: Optional[int] = None,
                                                        template_name: Optional[str] = None,
                                                        name: Optional[str] = None)
    func NewInstallationTemplatePartitionSchemeHardwareRaid(ctx *Context, name string, args InstallationTemplatePartitionSchemeHardwareRaidArgs, opts ...ResourceOption) (*InstallationTemplatePartitionSchemeHardwareRaid, error)
    public InstallationTemplatePartitionSchemeHardwareRaid(string name, InstallationTemplatePartitionSchemeHardwareRaidArgs args, CustomResourceOptions? opts = null)
    public InstallationTemplatePartitionSchemeHardwareRaid(String name, InstallationTemplatePartitionSchemeHardwareRaidArgs args)
    public InstallationTemplatePartitionSchemeHardwareRaid(String name, InstallationTemplatePartitionSchemeHardwareRaidArgs args, CustomResourceOptions options)
    
    type: ovh:Me:InstallationTemplatePartitionSchemeHardwareRaid
    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 InstallationTemplatePartitionSchemeHardwareRaidArgs
    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 InstallationTemplatePartitionSchemeHardwareRaidArgs
    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 InstallationTemplatePartitionSchemeHardwareRaidArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstallationTemplatePartitionSchemeHardwareRaidArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstallationTemplatePartitionSchemeHardwareRaidArgs
    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 installationTemplatePartitionSchemeHardwareRaidResource = new Ovh.Me.InstallationTemplatePartitionSchemeHardwareRaid("installationTemplatePartitionSchemeHardwareRaidResource", new()
    {
        Disks = new[]
        {
            "string",
        },
        Mode = "string",
        SchemeName = "string",
        Step = 0,
        TemplateName = "string",
        Name = "string",
    });
    
    example, err := Me.NewInstallationTemplatePartitionSchemeHardwareRaid(ctx, "installationTemplatePartitionSchemeHardwareRaidResource", &Me.InstallationTemplatePartitionSchemeHardwareRaidArgs{
    	Disks: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Mode:         pulumi.String("string"),
    	SchemeName:   pulumi.String("string"),
    	Step:         pulumi.Int(0),
    	TemplateName: pulumi.String("string"),
    	Name:         pulumi.String("string"),
    })
    
    var installationTemplatePartitionSchemeHardwareRaidResource = new InstallationTemplatePartitionSchemeHardwareRaid("installationTemplatePartitionSchemeHardwareRaidResource", InstallationTemplatePartitionSchemeHardwareRaidArgs.builder()
        .disks("string")
        .mode("string")
        .schemeName("string")
        .step(0)
        .templateName("string")
        .name("string")
        .build());
    
    installation_template_partition_scheme_hardware_raid_resource = ovh.me.InstallationTemplatePartitionSchemeHardwareRaid("installationTemplatePartitionSchemeHardwareRaidResource",
        disks=["string"],
        mode="string",
        scheme_name="string",
        step=0,
        template_name="string",
        name="string")
    
    const installationTemplatePartitionSchemeHardwareRaidResource = new ovh.me.InstallationTemplatePartitionSchemeHardwareRaid("installationTemplatePartitionSchemeHardwareRaidResource", {
        disks: ["string"],
        mode: "string",
        schemeName: "string",
        step: 0,
        templateName: "string",
        name: "string",
    });
    
    type: ovh:Me:InstallationTemplatePartitionSchemeHardwareRaid
    properties:
        disks:
            - string
        mode: string
        name: string
        schemeName: string
        step: 0
        templateName: string
    

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

    Disks List<string>
    Disk List. Syntax is cX:dY for disks and [cX:dY,cX:dY] for groups. With X and Y resp. the controller id and the disk id.
    Mode string
    RAID mode (raid0, raid1, raid10, raid5, raid50, raid6, raid60).
    SchemeName string
    The partition scheme name.
    Step int
    Specifies the creation order of the hardware RAID.
    TemplateName string
    The template name of the partition scheme.
    Name string
    Hardware RAID name.
    Disks []string
    Disk List. Syntax is cX:dY for disks and [cX:dY,cX:dY] for groups. With X and Y resp. the controller id and the disk id.
    Mode string
    RAID mode (raid0, raid1, raid10, raid5, raid50, raid6, raid60).
    SchemeName string
    The partition scheme name.
    Step int
    Specifies the creation order of the hardware RAID.
    TemplateName string
    The template name of the partition scheme.
    Name string
    Hardware RAID name.
    disks List<String>
    Disk List. Syntax is cX:dY for disks and [cX:dY,cX:dY] for groups. With X and Y resp. the controller id and the disk id.
    mode String
    RAID mode (raid0, raid1, raid10, raid5, raid50, raid6, raid60).
    schemeName String
    The partition scheme name.
    step Integer
    Specifies the creation order of the hardware RAID.
    templateName String
    The template name of the partition scheme.
    name String
    Hardware RAID name.
    disks string[]
    Disk List. Syntax is cX:dY for disks and [cX:dY,cX:dY] for groups. With X and Y resp. the controller id and the disk id.
    mode string
    RAID mode (raid0, raid1, raid10, raid5, raid50, raid6, raid60).
    schemeName string
    The partition scheme name.
    step number
    Specifies the creation order of the hardware RAID.
    templateName string
    The template name of the partition scheme.
    name string
    Hardware RAID name.
    disks Sequence[str]
    Disk List. Syntax is cX:dY for disks and [cX:dY,cX:dY] for groups. With X and Y resp. the controller id and the disk id.
    mode str
    RAID mode (raid0, raid1, raid10, raid5, raid50, raid6, raid60).
    scheme_name str
    The partition scheme name.
    step int
    Specifies the creation order of the hardware RAID.
    template_name str
    The template name of the partition scheme.
    name str
    Hardware RAID name.
    disks List<String>
    Disk List. Syntax is cX:dY for disks and [cX:dY,cX:dY] for groups. With X and Y resp. the controller id and the disk id.
    mode String
    RAID mode (raid0, raid1, raid10, raid5, raid50, raid6, raid60).
    schemeName String
    The partition scheme name.
    step Number
    Specifies the creation order of the hardware RAID.
    templateName String
    The template name of the partition scheme.
    name String
    Hardware RAID name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the InstallationTemplatePartitionSchemeHardwareRaid 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 InstallationTemplatePartitionSchemeHardwareRaid Resource

    Get an existing InstallationTemplatePartitionSchemeHardwareRaid 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?: InstallationTemplatePartitionSchemeHardwareRaidState, opts?: CustomResourceOptions): InstallationTemplatePartitionSchemeHardwareRaid
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            disks: Optional[Sequence[str]] = None,
            mode: Optional[str] = None,
            name: Optional[str] = None,
            scheme_name: Optional[str] = None,
            step: Optional[int] = None,
            template_name: Optional[str] = None) -> InstallationTemplatePartitionSchemeHardwareRaid
    func GetInstallationTemplatePartitionSchemeHardwareRaid(ctx *Context, name string, id IDInput, state *InstallationTemplatePartitionSchemeHardwareRaidState, opts ...ResourceOption) (*InstallationTemplatePartitionSchemeHardwareRaid, error)
    public static InstallationTemplatePartitionSchemeHardwareRaid Get(string name, Input<string> id, InstallationTemplatePartitionSchemeHardwareRaidState? state, CustomResourceOptions? opts = null)
    public static InstallationTemplatePartitionSchemeHardwareRaid get(String name, Output<String> id, InstallationTemplatePartitionSchemeHardwareRaidState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Disks List<string>
    Disk List. Syntax is cX:dY for disks and [cX:dY,cX:dY] for groups. With X and Y resp. the controller id and the disk id.
    Mode string
    RAID mode (raid0, raid1, raid10, raid5, raid50, raid6, raid60).
    Name string
    Hardware RAID name.
    SchemeName string
    The partition scheme name.
    Step int
    Specifies the creation order of the hardware RAID.
    TemplateName string
    The template name of the partition scheme.
    Disks []string
    Disk List. Syntax is cX:dY for disks and [cX:dY,cX:dY] for groups. With X and Y resp. the controller id and the disk id.
    Mode string
    RAID mode (raid0, raid1, raid10, raid5, raid50, raid6, raid60).
    Name string
    Hardware RAID name.
    SchemeName string
    The partition scheme name.
    Step int
    Specifies the creation order of the hardware RAID.
    TemplateName string
    The template name of the partition scheme.
    disks List<String>
    Disk List. Syntax is cX:dY for disks and [cX:dY,cX:dY] for groups. With X and Y resp. the controller id and the disk id.
    mode String
    RAID mode (raid0, raid1, raid10, raid5, raid50, raid6, raid60).
    name String
    Hardware RAID name.
    schemeName String
    The partition scheme name.
    step Integer
    Specifies the creation order of the hardware RAID.
    templateName String
    The template name of the partition scheme.
    disks string[]
    Disk List. Syntax is cX:dY for disks and [cX:dY,cX:dY] for groups. With X and Y resp. the controller id and the disk id.
    mode string
    RAID mode (raid0, raid1, raid10, raid5, raid50, raid6, raid60).
    name string
    Hardware RAID name.
    schemeName string
    The partition scheme name.
    step number
    Specifies the creation order of the hardware RAID.
    templateName string
    The template name of the partition scheme.
    disks Sequence[str]
    Disk List. Syntax is cX:dY for disks and [cX:dY,cX:dY] for groups. With X and Y resp. the controller id and the disk id.
    mode str
    RAID mode (raid0, raid1, raid10, raid5, raid50, raid6, raid60).
    name str
    Hardware RAID name.
    scheme_name str
    The partition scheme name.
    step int
    Specifies the creation order of the hardware RAID.
    template_name str
    The template name of the partition scheme.
    disks List<String>
    Disk List. Syntax is cX:dY for disks and [cX:dY,cX:dY] for groups. With X and Y resp. the controller id and the disk id.
    mode String
    RAID mode (raid0, raid1, raid10, raid5, raid50, raid6, raid60).
    name String
    Hardware RAID name.
    schemeName String
    The partition scheme name.
    step Number
    Specifies the creation order of the hardware RAID.
    templateName String
    The template name of the partition scheme.

    Import

    The resource can be imported using the template_name, scheme_name, name of the cluster, separated by “/” E.g.,

    bash

    $ pulumi import ovh:Me/installationTemplatePartitionSchemeHardwareRaid:InstallationTemplatePartitionSchemeHardwareRaid group1 template_name/scheme_name/name
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud