Cluster

Manages a V1 Magnum cluster resource within OpenStack.

Argument reference

The following arguments are supported:

  • region - (Optional) The region in which to obtain the V1 Container Infra client. A Container Infra client is needed to create a cluster. If omitted, the region argument of the provider is used. Changing this creates a new cluster.

  • name - (Required) The name of the cluster. Changing this updates the name of the existing cluster template.

  • project_id - (Optional) The project of the cluster. Required if admin wants to create a cluster in another project. Changing this creates a new cluster.

  • user_id - (Optional) The user of the cluster. Required if admin wants to create a cluster template for another user. Changing this creates a new cluster.

  • cluster_template_id - (Required) The UUID of the V1 Container Infra cluster template. Changing this creates a new cluster.

  • create_timeout - (Optional) The timeout (in minutes) for creating the cluster. Changing this creates a new cluster.

  • discovery_url - (Optional) The URL used for cluster node discovery. Changing this creates a new cluster.

  • docker_volume_size - (Optional) The size (in GB) of the Docker volume. Changing this creates a new cluster.

  • flavor - (Optional) The flavor for the nodes of the cluster. Can be set via the OS_MAGNUM_FLAVOR environment variable. Changing this creates a new cluster.

  • master_flavor - (Optional) The flavor for the master nodes. Can be set via the OS_MAGNUM_MASTER_FLAVOR environment variable. Changing this creates a new cluster.

  • keypair - (Optional) The name of the Compute service SSH keypair. Changing this creates a new cluster.

  • labels - (Optional) The list of key value pairs representing additional properties of the cluster. Changing this creates a new cluster.

  • master_count - (Optional) The number of master nodes for the cluster. Changing this creates a new cluster.

  • node_count - (Optional) The number of nodes for the cluster. Changing this creates a new cluster.

  • fixed_network - (Optional) The fixed network that will be attached to the cluster. Changing this creates a new cluster.

  • fixed_subnet - (Optional) The fixed subnet that will be attached to the cluster. Changing this creates a new cluster.

Attributes reference

The following attributes are exported:

  • region - See Argument Reference above.
  • name - See Argument Reference above.
  • project_id - See Argument Reference above.
  • created_at - The time at which cluster was created.
  • updated_at - The time at which cluster was created.
  • api_address - COE API address.
  • coe_version - COE software version.
  • cluster_template_id - See Argument Reference above.
  • container_version - Container software version.
  • create_timeout - See Argument Reference above.
  • discovery_url - See Argument Reference above.
  • docker_volume_size - See Argument Reference above.
  • flavor - See Argument Reference above.
  • master_flavor - See Argument Reference above.
  • keypair - See Argument Reference above.
  • labels - See Argument Reference above.
  • master_count - See Argument Reference above.
  • node_count - See Argument Reference above.
  • fixed_network - See Argument Reference above.
  • fixed_subnet - See Argument Reference above.
  • master_addresses - IP addresses of the master node of the cluster.
  • node_addresses - IP addresses of the node of the cluster.
  • stack_id - UUID of the Orchestration service stack.
  • kubeconfig - The Kubernetes cluster’s credentials
    • raw_config - The raw kubeconfig file
    • host - The cluster’s API server URL
    • cluster_ca_certificate - The cluster’s CA certificate
    • client_key - The client’s RSA key
    • client_certificate - The client’s certificate

Example Usage

Create a Cluster

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var cluster1 = new OpenStack.ContainerInfra.Cluster("cluster1", new OpenStack.ContainerInfra.ClusterArgs
        {
            ClusterTemplateId = "b9a45c5c-cd03-4958-82aa-b80bf93cb922",
            Keypair = "ssh_keypair",
            MasterCount = 3,
            NodeCount = 5,
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

cluster1 = openstack.containerinfra.Cluster("cluster1",
    cluster_template_id="b9a45c5c-cd03-4958-82aa-b80bf93cb922",
    keypair="ssh_keypair",
    master_count=3,
    node_count=5)
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const cluster1 = new openstack.containerinfra.Cluster("cluster_1", {
    clusterTemplateId: "b9a45c5c-cd03-4958-82aa-b80bf93cb922",
    keypair: "ssh_keypair",
    masterCount: 3,
    nodeCount: 5,
});

Create a Cluster Resource

new Cluster(name: string, args: ClusterArgs, opts?: CustomResourceOptions);
def Cluster(resource_name, opts=None, cluster_template_id=None, create_timeout=None, discovery_url=None, docker_volume_size=None, fixed_network=None, fixed_subnet=None, flavor=None, keypair=None, labels=None, master_count=None, master_flavor=None, name=None, node_count=None, region=None, __props__=None);
func NewCluster(ctx *Context, name string, args ClusterArgs, opts ...ResourceOption) (*Cluster, error)
public Cluster(string name, ClusterArgs args, CustomResourceOptions? opts = null)
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.
opts ResourceOptions
A bag of options that control this 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.

Cluster Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Cluster resource accepts the following input properties:

ClusterTemplateId string
CreateTimeout int
DiscoveryUrl string
DockerVolumeSize int
FixedNetwork string
FixedSubnet string
Flavor string
Keypair string
Labels Dictionary<string, object>
MasterCount int
MasterFlavor string
Name string
NodeCount int
Region string
ClusterTemplateId string
CreateTimeout int
DiscoveryUrl string
DockerVolumeSize int
FixedNetwork string
FixedSubnet string
Flavor string
Keypair string
Labels map[string]interface{}
MasterCount int
MasterFlavor string
Name string
NodeCount int
Region string
clusterTemplateId string
createTimeout number
discoveryUrl string
dockerVolumeSize number
fixedNetwork string
fixedSubnet string
flavor string
keypair string
labels {[key: string]: any}
masterCount number
masterFlavor string
name string
nodeCount number
region string
cluster_template_id str
create_timeout float
discovery_url str
docker_volume_size float
fixed_network str
fixed_subnet str
flavor str
keypair str
labels Dict[str, Any]
master_count float
master_flavor str
name str
node_count float
region str

Outputs

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

ApiAddress string
CoeVersion string
ContainerVersion string
CreatedAt string
Id string
The provider-assigned unique ID for this managed resource.
Kubeconfig Pulumi.OpenStack.ContainerInfra.Outputs.ClusterKubeconfig
MasterAddresses List<string>
NodeAddresses List<string>
ProjectId string
StackId string
UpdatedAt string
UserId string
ApiAddress string
CoeVersion string
ContainerVersion string
CreatedAt string
Id string
The provider-assigned unique ID for this managed resource.
Kubeconfig ClusterKubeconfig
MasterAddresses []string
NodeAddresses []string
ProjectId string
StackId string
UpdatedAt string
UserId string
apiAddress string
coeVersion string
containerVersion string
createdAt string
id string
The provider-assigned unique ID for this managed resource.
kubeconfig ClusterKubeconfig
masterAddresses string[]
nodeAddresses string[]
projectId string
stackId string
updatedAt string
userId string
api_address str
coe_version str
container_version str
created_at str
id str
The provider-assigned unique ID for this managed resource.
kubeconfig Dict[ClusterKubeconfig]
master_addresses List[str]
node_addresses List[str]
project_id str
stack_id str
updated_at str
user_id str

Look up an 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
static get(resource_name, id, opts=None, api_address=None, cluster_template_id=None, coe_version=None, container_version=None, create_timeout=None, created_at=None, discovery_url=None, docker_volume_size=None, fixed_network=None, fixed_subnet=None, flavor=None, keypair=None, kubeconfig=None, labels=None, master_addresses=None, master_count=None, master_flavor=None, name=None, node_addresses=None, node_count=None, project_id=None, region=None, stack_id=None, updated_at=None, user_id=None, __props__=None);
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)
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.

The following state arguments are supported:

ApiAddress string
ClusterTemplateId string
CoeVersion string
ContainerVersion string
CreateTimeout int
CreatedAt string
DiscoveryUrl string
DockerVolumeSize int
FixedNetwork string
FixedSubnet string
Flavor string
Keypair string
Kubeconfig Pulumi.OpenStack.ContainerInfra.Inputs.ClusterKubeconfigArgs
Labels Dictionary<string, object>
MasterAddresses List<string>
MasterCount int
MasterFlavor string
Name string
NodeAddresses List<string>
NodeCount int
ProjectId string
Region string
StackId string
UpdatedAt string
UserId string
ApiAddress string
ClusterTemplateId string
CoeVersion string
ContainerVersion string
CreateTimeout int
CreatedAt string
DiscoveryUrl string
DockerVolumeSize int
FixedNetwork string
FixedSubnet string
Flavor string
Keypair string
Kubeconfig ClusterKubeconfig
Labels map[string]interface{}
MasterAddresses []string
MasterCount int
MasterFlavor string
Name string
NodeAddresses []string
NodeCount int
ProjectId string
Region string
StackId string
UpdatedAt string
UserId string
apiAddress string
clusterTemplateId string
coeVersion string
containerVersion string
createTimeout number
createdAt string
discoveryUrl string
dockerVolumeSize number
fixedNetwork string
fixedSubnet string
flavor string
keypair string
kubeconfig ClusterKubeconfig
labels {[key: string]: any}
masterAddresses string[]
masterCount number
masterFlavor string
name string
nodeAddresses string[]
nodeCount number
projectId string
region string
stackId string
updatedAt string
userId string
api_address str
cluster_template_id str
coe_version str
container_version str
create_timeout float
created_at str
discovery_url str
docker_volume_size float
fixed_network str
fixed_subnet str
flavor str
keypair str
kubeconfig Dict[ClusterKubeconfig]
labels Dict[str, Any]
master_addresses List[str]
master_count float
master_flavor str
name str
node_addresses List[str]
node_count float
project_id str
region str
stack_id str
updated_at str
user_id str

Supporting Types

ClusterKubeconfig

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

ClientCertificate string
ClientKey string
ClusterCaCertificate string
Host string
RawConfig string
ClientCertificate string
ClientKey string
ClusterCaCertificate string
Host string
RawConfig string
clientCertificate string
clientKey string
clusterCaCertificate string
host string
rawConfig string
client_certificate str
client_key str
cluster_ca_certificate str
host str
raw_config str

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.