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, theregionargument 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 theOS_MAGNUM_FLAVORenvironment variable. Changing this creates a new cluster.master_flavor- (Optional) The flavor for the master nodes. Can be set via theOS_MAGNUM_MASTER_FLAVORenvironment 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 credentialsraw_config- The raw kubeconfig filehost- The cluster’s API server URLcluster_ca_certificate- The cluster’s CA certificateclient_key- The client’s RSA keyclient_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:
Outputs
All input properties are implicitly available as output properties. Additionally, the Cluster resource produces the following output properties:
- Api
Address string - Coe
Version string - Container
Version string - Created
At string - Id string
- The provider-assigned unique ID for this managed resource.
- Kubeconfig
Pulumi.
Open Stack. Container Infra. Outputs. Cluster Kubeconfig - Master
Addresses List<string> - Node
Addresses List<string> - Project
Id string - Stack
Id string - Updated
At string - User
Id string
- Api
Address string - Coe
Version string - Container
Version string - Created
At string - Id string
- The provider-assigned unique ID for this managed resource.
- Kubeconfig
Cluster
Kubeconfig - Master
Addresses []string - Node
Addresses []string - Project
Id string - Stack
Id string - Updated
At string - User
Id string
- api
Address string - coe
Version string - container
Version string - created
At string - id string
- The provider-assigned unique ID for this managed resource.
- kubeconfig
Cluster
Kubeconfig - master
Addresses string[] - node
Addresses string[] - project
Id string - stack
Id string - updated
At string - user
Id 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[Cluster
Kubeconfig] - 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): Clusterstatic 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:
- Api
Address string - Cluster
Template stringId - Coe
Version string - Container
Version string - Create
Timeout int - Created
At string - Discovery
Url string - Docker
Volume intSize - Fixed
Network string - Fixed
Subnet string - Flavor string
- Keypair string
- Kubeconfig
Pulumi.
Open Stack. Container Infra. Inputs. Cluster Kubeconfig Args - Labels Dictionary<string, object>
- Master
Addresses List<string> - Master
Count int - Master
Flavor string - Name string
- Node
Addresses List<string> - Node
Count int - Project
Id string - Region string
- Stack
Id string - Updated
At string - User
Id string
- Api
Address string - Cluster
Template stringId - Coe
Version string - Container
Version string - Create
Timeout int - Created
At string - Discovery
Url string - Docker
Volume intSize - Fixed
Network string - Fixed
Subnet string - Flavor string
- Keypair string
- Kubeconfig
Cluster
Kubeconfig - Labels map[string]interface{}
- Master
Addresses []string - Master
Count int - Master
Flavor string - Name string
- Node
Addresses []string - Node
Count int - Project
Id string - Region string
- Stack
Id string - Updated
At string - User
Id string
- api
Address string - cluster
Template stringId - coe
Version string - container
Version string - create
Timeout number - created
At string - discovery
Url string - docker
Volume numberSize - fixed
Network string - fixed
Subnet string - flavor string
- keypair string
- kubeconfig
Cluster
Kubeconfig - labels {[key: string]: any}
- master
Addresses string[] - master
Count number - master
Flavor string - name string
- node
Addresses string[] - node
Count number - project
Id string - region string
- stack
Id string - updated
At string - user
Id string
- api_
address str - cluster_
template_ strid - coe_
version str - container_
version str - create_
timeout float - created_
at str - discovery_
url str - docker_
volume_ floatsize - fixed_
network str - fixed_
subnet str - flavor str
- keypair str
- kubeconfig
Dict[Cluster
Kubeconfig] - 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.