1. Packages
  2. Opennebula Provider
  3. API Docs
  4. Cluster
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

opennebula.Cluster

Explore with Pulumi AI

opennebula logo
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

    Provides an OpenNebula cluster resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opennebula from "@pulumi/opennebula";
    
    const example = new opennebula.Cluster("example", {
        tags: {
            environment: "example",
        },
        templateSections: [{
            elements: {
                tag1: "value",
            },
            name: "example",
        }],
    });
    
    import pulumi
    import pulumi_opennebula as opennebula
    
    example = opennebula.Cluster("example",
        tags={
            "environment": "example",
        },
        template_sections=[{
            "elements": {
                "tag1": "value",
            },
            "name": "example",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opennebula/opennebula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opennebula.NewCluster(ctx, "example", &opennebula.ClusterArgs{
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("example"),
    			},
    			TemplateSections: opennebula.ClusterTemplateSectionArray{
    				&opennebula.ClusterTemplateSectionArgs{
    					Elements: pulumi.StringMap{
    						"tag1": pulumi.String("value"),
    					},
    					Name: pulumi.String("example"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opennebula = Pulumi.Opennebula;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Opennebula.Cluster("example", new()
        {
            Tags = 
            {
                { "environment", "example" },
            },
            TemplateSections = new[]
            {
                new Opennebula.Inputs.ClusterTemplateSectionArgs
                {
                    Elements = 
                    {
                        { "tag1", "value" },
                    },
                    Name = "example",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opennebula.Cluster;
    import com.pulumi.opennebula.ClusterArgs;
    import com.pulumi.opennebula.inputs.ClusterTemplateSectionArgs;
    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 example = new Cluster("example", ClusterArgs.builder()
                .tags(Map.of("environment", "example"))
                .templateSections(ClusterTemplateSectionArgs.builder()
                    .elements(Map.of("tag1", "value"))
                    .name("example")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: opennebula:Cluster
        properties:
          tags:
            environment: example
          templateSections:
            - elements:
                tag1: value
              name: example
    

    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: Optional[ClusterArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Cluster(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                cluster_id: Optional[str] = None,
                name: Optional[str] = None,
                tags: Optional[Mapping[str, str]] = None,
                template_sections: Optional[Sequence[ClusterTemplateSectionArgs]] = None)
    func NewCluster(ctx *Context, name string, args *ClusterArgs, opts ...ResourceOption) (*Cluster, error)
    public Cluster(string name, ClusterArgs? args = null, CustomResourceOptions? opts = null)
    public Cluster(String name, ClusterArgs args)
    public Cluster(String name, ClusterArgs args, CustomResourceOptions options)
    
    type: opennebula:Cluster
    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 ClusterArgs
    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 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 string
    The unique name of the resource.
    args ClusterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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 Opennebula.Cluster("clusterResource", new()
    {
        ClusterId = "string",
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
        TemplateSections = new[]
        {
            new Opennebula.Inputs.ClusterTemplateSectionArgs
            {
                Name = "string",
                Elements = 
                {
                    { "string", "string" },
                },
            },
        },
    });
    
    example, err := opennebula.NewCluster(ctx, "clusterResource", &opennebula.ClusterArgs{
    	ClusterId: pulumi.String("string"),
    	Name:      pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TemplateSections: opennebula.ClusterTemplateSectionArray{
    		&opennebula.ClusterTemplateSectionArgs{
    			Name: pulumi.String("string"),
    			Elements: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    		},
    	},
    })
    
    var clusterResource = new Cluster("clusterResource", ClusterArgs.builder()
        .clusterId("string")
        .name("string")
        .tags(Map.of("string", "string"))
        .templateSections(ClusterTemplateSectionArgs.builder()
            .name("string")
            .elements(Map.of("string", "string"))
            .build())
        .build());
    
    cluster_resource = opennebula.Cluster("clusterResource",
        cluster_id="string",
        name="string",
        tags={
            "string": "string",
        },
        template_sections=[{
            "name": "string",
            "elements": {
                "string": "string",
            },
        }])
    
    const clusterResource = new opennebula.Cluster("clusterResource", {
        clusterId: "string",
        name: "string",
        tags: {
            string: "string",
        },
        templateSections: [{
            name: "string",
            elements: {
                string: "string",
            },
        }],
    });
    
    type: opennebula:Cluster
    properties:
        clusterId: string
        name: string
        tags:
            string: string
        templateSections:
            - elements:
                string: string
              name: 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:

    ClusterId string
    ID of the cluster.
    Name string
    The name of the cluster.
    Tags Dictionary<string, string>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TemplateSections List<ClusterTemplateSection>
    Allow to add a custom vector. See Template section parameters
    ClusterId string
    ID of the cluster.
    Name string
    The name of the cluster.
    Tags map[string]string
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TemplateSections []ClusterTemplateSectionArgs
    Allow to add a custom vector. See Template section parameters
    clusterId String
    ID of the cluster.
    name String
    The name of the cluster.
    tags Map<String,String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    templateSections List<ClusterTemplateSection>
    Allow to add a custom vector. See Template section parameters
    clusterId string
    ID of the cluster.
    name string
    The name of the cluster.
    tags {[key: string]: string}
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    templateSections ClusterTemplateSection[]
    Allow to add a custom vector. See Template section parameters
    cluster_id str
    ID of the cluster.
    name str
    The name of the cluster.
    tags Mapping[str, str]
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    template_sections Sequence[ClusterTemplateSectionArgs]
    Allow to add a custom vector. See Template section parameters
    clusterId String
    ID of the cluster.
    name String
    The name of the cluster.
    tags Map<String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    templateSections List<Property Map>
    Allow to add a custom vector. See Template section parameters

    Outputs

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

    Datastores List<double>
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    DefaultTags Dictionary<string, string>
    Default tags defined in the provider configuration.
    Hosts List<double>
    List of hosts user IDs part of the cluster.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    Result of the applied default_tags and then resource tags.
    VirtualNetworks List<double>
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    Datastores []float64
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    DefaultTags map[string]string
    Default tags defined in the provider configuration.
    Hosts []float64
    List of hosts user IDs part of the cluster.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    Result of the applied default_tags and then resource tags.
    VirtualNetworks []float64
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    datastores List<Double>
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    defaultTags Map<String,String>
    Default tags defined in the provider configuration.
    hosts List<Double>
    List of hosts user IDs part of the cluster.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    Result of the applied default_tags and then resource tags.
    virtualNetworks List<Double>
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    datastores number[]
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    defaultTags {[key: string]: string}
    Default tags defined in the provider configuration.
    hosts number[]
    List of hosts user IDs part of the cluster.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    Result of the applied default_tags and then resource tags.
    virtualNetworks number[]
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    datastores Sequence[float]
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    default_tags Mapping[str, str]
    Default tags defined in the provider configuration.
    hosts Sequence[float]
    List of hosts user IDs part of the cluster.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    Result of the applied default_tags and then resource tags.
    virtual_networks Sequence[float]
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    datastores List<Number>
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    defaultTags Map<String>
    Default tags defined in the provider configuration.
    hosts List<Number>
    List of hosts user IDs part of the cluster.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    Result of the applied default_tags and then resource tags.
    virtualNetworks List<Number>
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    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,
            cluster_id: Optional[str] = None,
            datastores: Optional[Sequence[float]] = None,
            default_tags: Optional[Mapping[str, str]] = None,
            hosts: Optional[Sequence[float]] = None,
            name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            template_sections: Optional[Sequence[ClusterTemplateSectionArgs]] = None,
            virtual_networks: Optional[Sequence[float]] = 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: opennebula:Cluster    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:
    ClusterId string
    ID of the cluster.
    Datastores List<double>
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    DefaultTags Dictionary<string, string>
    Default tags defined in the provider configuration.
    Hosts List<double>
    List of hosts user IDs part of the cluster.
    Name string
    The name of the cluster.
    Tags Dictionary<string, string>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TagsAll Dictionary<string, string>
    Result of the applied default_tags and then resource tags.
    TemplateSections List<ClusterTemplateSection>
    Allow to add a custom vector. See Template section parameters
    VirtualNetworks List<double>
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    ClusterId string
    ID of the cluster.
    Datastores []float64
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    DefaultTags map[string]string
    Default tags defined in the provider configuration.
    Hosts []float64
    List of hosts user IDs part of the cluster.
    Name string
    The name of the cluster.
    Tags map[string]string
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TagsAll map[string]string
    Result of the applied default_tags and then resource tags.
    TemplateSections []ClusterTemplateSectionArgs
    Allow to add a custom vector. See Template section parameters
    VirtualNetworks []float64
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    clusterId String
    ID of the cluster.
    datastores List<Double>
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    defaultTags Map<String,String>
    Default tags defined in the provider configuration.
    hosts List<Double>
    List of hosts user IDs part of the cluster.
    name String
    The name of the cluster.
    tags Map<String,String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tagsAll Map<String,String>
    Result of the applied default_tags and then resource tags.
    templateSections List<ClusterTemplateSection>
    Allow to add a custom vector. See Template section parameters
    virtualNetworks List<Double>
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    clusterId string
    ID of the cluster.
    datastores number[]
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    defaultTags {[key: string]: string}
    Default tags defined in the provider configuration.
    hosts number[]
    List of hosts user IDs part of the cluster.
    name string
    The name of the cluster.
    tags {[key: string]: string}
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tagsAll {[key: string]: string}
    Result of the applied default_tags and then resource tags.
    templateSections ClusterTemplateSection[]
    Allow to add a custom vector. See Template section parameters
    virtualNetworks number[]
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    cluster_id str
    ID of the cluster.
    datastores Sequence[float]
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    default_tags Mapping[str, str]
    Default tags defined in the provider configuration.
    hosts Sequence[float]
    List of hosts user IDs part of the cluster.
    name str
    The name of the cluster.
    tags Mapping[str, str]
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tags_all Mapping[str, str]
    Result of the applied default_tags and then resource tags.
    template_sections Sequence[ClusterTemplateSectionArgs]
    Allow to add a custom vector. See Template section parameters
    virtual_networks Sequence[float]
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    clusterId String
    ID of the cluster.
    datastores List<Number>
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    defaultTags Map<String>
    Default tags defined in the provider configuration.
    hosts List<Number>
    List of hosts user IDs part of the cluster.
    name String
    The name of the cluster.
    tags Map<String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tagsAll Map<String>
    Result of the applied default_tags and then resource tags.
    templateSections List<Property Map>
    Allow to add a custom vector. See Template section parameters
    virtualNetworks List<Number>
    List of hosts user IDs part of the cluster.

    Deprecated: Deprecated

    Supporting Types

    ClusterTemplateSection, ClusterTemplateSectionArgs

    Name string
    The vector name.
    Elements Dictionary<string, string>
    Collection of custom tags.
    Name string
    The vector name.
    Elements map[string]string
    Collection of custom tags.
    name String
    The vector name.
    elements Map<String,String>
    Collection of custom tags.
    name string
    The vector name.
    elements {[key: string]: string}
    Collection of custom tags.
    name str
    The vector name.
    elements Mapping[str, str]
    Collection of custom tags.
    name String
    The vector name.
    elements Map<String>
    Collection of custom tags.

    Import

    opennebula_cluster can be imported using its ID:

    $ pulumi import opennebula:index/cluster:Cluster example 123
    

    https://registry.terraform.io/docs/providers/aws/r/iam_service_linked_role.html

    /docs/providers/aws/r/iam_service_linked_role.html

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

    Package Details

    Repository
    opennebula opennebula/terraform-provider-opennebula
    License
    Notes
    This Pulumi package is based on the opennebula Terraform Provider.
    opennebula logo
    opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula