opennebula.Cluster
Explore with Pulumi AI
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:
- Cluster
Id string - ID of the cluster.
- Name string
- The name of the cluster.
- Dictionary<string, string>
- Map of tags (
key=value
) assigned to the resource. Override matching tags present in thedefault_tags
atribute when configured in theprovider
block. See tags usage related documentation for more information. - Template
Sections List<ClusterTemplate Section> - Allow to add a custom vector. See Template section parameters
- Cluster
Id string - ID of the cluster.
- Name string
- The name of the cluster.
- map[string]string
- Map of tags (
key=value
) assigned to the resource. Override matching tags present in thedefault_tags
atribute when configured in theprovider
block. See tags usage related documentation for more information. - Template
Sections []ClusterTemplate Section Args - Allow to add a custom vector. See Template section parameters
- cluster
Id String - ID of the cluster.
- name String
- The name of the cluster.
- Map<String,String>
- Map of tags (
key=value
) assigned to the resource. Override matching tags present in thedefault_tags
atribute when configured in theprovider
block. See tags usage related documentation for more information. - template
Sections List<ClusterTemplate Section> - Allow to add a custom vector. See Template section parameters
- cluster
Id string - ID of the cluster.
- name string
- The name of the cluster.
- {[key: string]: string}
- Map of tags (
key=value
) assigned to the resource. Override matching tags present in thedefault_tags
atribute when configured in theprovider
block. See tags usage related documentation for more information. - template
Sections ClusterTemplate Section[] - Allow to add a custom vector. See Template section parameters
- cluster_
id str - ID of the cluster.
- name str
- The name of the cluster.
- Mapping[str, str]
- Map of tags (
key=value
) assigned to the resource. Override matching tags present in thedefault_tags
atribute when configured in theprovider
block. See tags usage related documentation for more information. - template_
sections Sequence[ClusterTemplate Section Args] - Allow to add a custom vector. See Template section parameters
- cluster
Id String - ID of the cluster.
- name String
- The name of the cluster.
- Map<String>
- Map of tags (
key=value
) assigned to the resource. Override matching tags present in thedefault_tags
atribute when configured in theprovider
block. See tags usage related documentation for more information. - template
Sections 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.
- 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.
- Dictionary<string, string>
- Result of the applied
default_tags
and then resourcetags
. - Virtual
Networks List<double> - List of hosts user IDs part of the cluster.
- Datastores []float64
- List of hosts user IDs part of the cluster.
- 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.
- map[string]string
- Result of the applied
default_tags
and then resourcetags
. - Virtual
Networks []float64 - List of hosts user IDs part of the cluster.
- datastores List<Double>
- List of hosts user IDs part of the cluster.
- 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.
- Map<String,String>
- Result of the applied
default_tags
and then resourcetags
. - virtual
Networks List<Double> - List of hosts user IDs part of the cluster.
- datastores number[]
- List of hosts user IDs part of the cluster.
- {[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.
- {[key: string]: string}
- Result of the applied
default_tags
and then resourcetags
. - virtual
Networks number[] - List of hosts user IDs part of the cluster.
- datastores Sequence[float]
- List of hosts user IDs part of the cluster.
- 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.
- Mapping[str, str]
- Result of the applied
default_tags
and then resourcetags
. - virtual_
networks Sequence[float] - List of hosts user IDs part of the cluster.
- datastores List<Number>
- List of hosts user IDs part of the cluster.
- 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.
- Map<String>
- Result of the applied
default_tags
and then resourcetags
. - virtual
Networks List<Number> - List of hosts user IDs part of the cluster.
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.
- Cluster
Id string - ID of the cluster.
- Datastores List<double>
- List of hosts user IDs part of the cluster.
- 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.
- Dictionary<string, string>
- Map of tags (
key=value
) assigned to the resource. Override matching tags present in thedefault_tags
atribute when configured in theprovider
block. See tags usage related documentation for more information. - Dictionary<string, string>
- Result of the applied
default_tags
and then resourcetags
. - Template
Sections List<ClusterTemplate Section> - Allow to add a custom vector. See Template section parameters
- Virtual
Networks List<double> - List of hosts user IDs part of the cluster.
- Cluster
Id string - ID of the cluster.
- Datastores []float64
- List of hosts user IDs part of the cluster.
- 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.
- map[string]string
- Map of tags (
key=value
) assigned to the resource. Override matching tags present in thedefault_tags
atribute when configured in theprovider
block. See tags usage related documentation for more information. - map[string]string
- Result of the applied
default_tags
and then resourcetags
. - Template
Sections []ClusterTemplate Section Args - Allow to add a custom vector. See Template section parameters
- Virtual
Networks []float64 - List of hosts user IDs part of the cluster.
- cluster
Id String - ID of the cluster.
- datastores List<Double>
- List of hosts user IDs part of the cluster.
- 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.
- Map<String,String>
- Map of tags (
key=value
) assigned to the resource. Override matching tags present in thedefault_tags
atribute when configured in theprovider
block. See tags usage related documentation for more information. - Map<String,String>
- Result of the applied
default_tags
and then resourcetags
. - template
Sections List<ClusterTemplate Section> - Allow to add a custom vector. See Template section parameters
- virtual
Networks List<Double> - List of hosts user IDs part of the cluster.
- cluster
Id string - ID of the cluster.
- datastores number[]
- List of hosts user IDs part of the cluster.
- {[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.
- {[key: string]: string}
- Map of tags (
key=value
) assigned to the resource. Override matching tags present in thedefault_tags
atribute when configured in theprovider
block. See tags usage related documentation for more information. - {[key: string]: string}
- Result of the applied
default_tags
and then resourcetags
. - template
Sections ClusterTemplate Section[] - Allow to add a custom vector. See Template section parameters
- virtual
Networks number[] - List of hosts user IDs part of the cluster.
- cluster_
id str - ID of the cluster.
- datastores Sequence[float]
- List of hosts user IDs part of the cluster.
- 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.
- Mapping[str, str]
- Map of tags (
key=value
) assigned to the resource. Override matching tags present in thedefault_tags
atribute when configured in theprovider
block. See tags usage related documentation for more information. - Mapping[str, str]
- Result of the applied
default_tags
and then resourcetags
. - template_
sections Sequence[ClusterTemplate Section Args] - Allow to add a custom vector. See Template section parameters
- virtual_
networks Sequence[float] - List of hosts user IDs part of the cluster.
- cluster
Id String - ID of the cluster.
- datastores List<Number>
- List of hosts user IDs part of the cluster.
- 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.
- Map<String>
- Map of tags (
key=value
) assigned to the resource. Override matching tags present in thedefault_tags
atribute when configured in theprovider
block. See tags usage related documentation for more information. - Map<String>
- Result of the applied
default_tags
and then resourcetags
. - template
Sections List<Property Map> - Allow to add a custom vector. See Template section parameters
- virtual
Networks List<Number> - List of hosts user IDs part of the cluster.
Supporting Types
ClusterTemplateSection, ClusterTemplateSectionArgs
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.