@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
421 lines (420 loc) • 14.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a V1 Magnum cluster resource within OpenStack.
*
* > **Note:** All arguments including the `kubeconfig` computed attribute will be
* stored in the raw state as plain-text. Read more about sensitive data in
* state.
*
* ## Example Usage
*
* ### Create a Cluster
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as openstack from "@pulumi/openstack";
*
* const cluster1 = new openstack.containerinfra.Cluster("cluster_1", {
* name: "cluster_1",
* clusterTemplateId: "b9a45c5c-cd03-4958-82aa-b80bf93cb922",
* masterCount: 3,
* nodeCount: 5,
* keypair: "ssh_keypair",
* });
* ```
*
* ## Attributes reference
*
* The following attributes are exported:
*
* * `region` - See Argument Reference above.
* * `name` - See Argument Reference above.
* * `projectId` - See Argument Reference above.
* * `createdAt` - The time at which cluster was created.
* * `updatedAt` - The time at which cluster was created.
* * `apiAddress` - COE API address.
* * `coeVersion` - COE software version.
* * `clusterTemplateId` - See Argument Reference above.
* * `containerVersion` - Container software version.
* * `createTimeout` - See Argument Reference above.
* * `discoveryUrl` - See Argument Reference above.
* * `dockerVolumeSize` - See Argument Reference above.
* * `flavor` - See Argument Reference above.
* * `masterFlavor` - See Argument Reference above.
* * `keypair` - See Argument Reference above.
* * `labels` - See Argument Reference above.
* * `mergeLabels` - See Argument Reference above.
* * `masterCount` - See Argument Reference above.
* * `nodeCount` - See Argument Reference above.
* * `fixedNetwork` - See Argument Reference above.
* * `fixedSubnet` - See Argument Reference above.
* * `floatingIpEnabled` - See Argument Reference above.
* * `masterAddresses` - IP addresses of the master node of the cluster.
* * `nodeAddresses` - IP addresses of the node of the cluster.
* * `stackId` - UUID of the Orchestration service stack.
* * `kubeconfig` - The Kubernetes cluster's credentials
* * `rawConfig` - The raw kubeconfig file
* * `host` - The cluster's API server URL
* * `clusterCaCertificate` - The cluster's CA certificate
* * `clientKey` - The client's RSA key
* * `clientCertificate` - The client's certificate
*
* ## Import
*
* Clusters can be imported using the `id`, e.g.
*
* ```sh
* $ pulumi import openstack:containerinfra/cluster:Cluster cluster_1 ce0f9463-dd25-474b-9fe8-94de63e5e42b
* ```
*/
export declare class Cluster extends pulumi.CustomResource {
/**
* Get an existing Cluster resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ClusterState, opts?: pulumi.CustomResourceOptions): Cluster;
/**
* Returns true if the given object is an instance of Cluster. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Cluster;
readonly apiAddress: pulumi.Output<string>;
/**
* The UUID of the V1 Container Infra cluster
* template. Changing this creates a new cluster.
*/
readonly clusterTemplateId: pulumi.Output<string>;
readonly coeVersion: pulumi.Output<string>;
readonly containerVersion: pulumi.Output<string>;
/**
* The timeout (in minutes) for creating the
* cluster. Changing this creates a new cluster.
*/
readonly createTimeout: pulumi.Output<number>;
readonly createdAt: pulumi.Output<string>;
/**
* The URL used for cluster node discovery.
* Changing this creates a new cluster.
*/
readonly discoveryUrl: pulumi.Output<string>;
/**
* The size (in GB) of the Docker volume.
* Changing this creates a new cluster.
*/
readonly dockerVolumeSize: pulumi.Output<number>;
/**
* The fixed network that will be attached to the
* cluster. Changing this creates a new cluster.
*/
readonly fixedNetwork: pulumi.Output<string>;
/**
* The fixed subnet that will be attached to the
* cluster. Changing this creates a new cluster.
*/
readonly fixedSubnet: pulumi.Output<string>;
/**
* The flavor for the nodes of the cluster. Can be set via
* the `OS_MAGNUM_FLAVOR` environment variable. Changing this creates a new
* cluster.
*/
readonly flavor: pulumi.Output<string>;
/**
* Indicates whether floating IP should be
* created for every cluster node. Changing this creates a new cluster.
*/
readonly floatingIpEnabled: pulumi.Output<boolean>;
/**
* The name of the Compute service SSH keypair. Changing
* this creates a new cluster.
*/
readonly keypair: pulumi.Output<string>;
readonly kubeconfig: pulumi.Output<{
[key: string]: string;
}>;
/**
* The list of key value pairs representing additional
* properties of the cluster. Changing this creates a new cluster.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
}>;
readonly masterAddresses: pulumi.Output<string[]>;
/**
* The number of master nodes for the cluster.
* Changing this creates a new cluster.
*/
readonly masterCount: pulumi.Output<number>;
/**
* The flavor for the master nodes. Can be set via
* the `OS_MAGNUM_MASTER_FLAVOR` environment variable. Changing this creates a
* new cluster.
*/
readonly masterFlavor: pulumi.Output<string>;
/**
* Indicates whether to create a load balancer
* for the master nodes. Changing this creates a new cluster.
*/
readonly masterLbEnabled: pulumi.Output<boolean>;
/**
* Indicates whether the provided labels should be
* merged with cluster template labels. Changing this creates a new cluster.
*/
readonly mergeLabels: pulumi.Output<boolean | undefined>;
/**
* The name of the cluster. Changing this creates a new
* cluster.
*/
readonly name: pulumi.Output<string>;
readonly nodeAddresses: pulumi.Output<string[]>;
/**
* The number of nodes for the cluster.
*/
readonly nodeCount: pulumi.Output<number | undefined>;
/**
* The project of the cluster. Required if admin wants
* to create a cluster in another project. Changing this creates a new
* cluster.
*/
readonly projectId: pulumi.Output<string>;
/**
* 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.
*/
readonly region: pulumi.Output<string>;
readonly stackId: pulumi.Output<string>;
readonly updatedAt: pulumi.Output<string>;
/**
* The user of the cluster. Required if admin wants to
* create a cluster template for another user. Changing this creates a new
* cluster.
*/
readonly userId: pulumi.Output<string>;
/**
* Create a Cluster resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: ClusterArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Cluster resources.
*/
export interface ClusterState {
apiAddress?: pulumi.Input<string>;
/**
* The UUID of the V1 Container Infra cluster
* template. Changing this creates a new cluster.
*/
clusterTemplateId?: pulumi.Input<string>;
coeVersion?: pulumi.Input<string>;
containerVersion?: pulumi.Input<string>;
/**
* The timeout (in minutes) for creating the
* cluster. Changing this creates a new cluster.
*/
createTimeout?: pulumi.Input<number>;
createdAt?: pulumi.Input<string>;
/**
* The URL used for cluster node discovery.
* Changing this creates a new cluster.
*/
discoveryUrl?: pulumi.Input<string>;
/**
* The size (in GB) of the Docker volume.
* Changing this creates a new cluster.
*/
dockerVolumeSize?: pulumi.Input<number>;
/**
* The fixed network that will be attached to the
* cluster. Changing this creates a new cluster.
*/
fixedNetwork?: pulumi.Input<string>;
/**
* The fixed subnet that will be attached to the
* cluster. Changing this creates a new cluster.
*/
fixedSubnet?: pulumi.Input<string>;
/**
* The flavor for the nodes of the cluster. Can be set via
* the `OS_MAGNUM_FLAVOR` environment variable. Changing this creates a new
* cluster.
*/
flavor?: pulumi.Input<string>;
/**
* Indicates whether floating IP should be
* created for every cluster node. Changing this creates a new cluster.
*/
floatingIpEnabled?: pulumi.Input<boolean>;
/**
* The name of the Compute service SSH keypair. Changing
* this creates a new cluster.
*/
keypair?: pulumi.Input<string>;
kubeconfig?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The list of key value pairs representing additional
* properties of the cluster. Changing this creates a new cluster.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
masterAddresses?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The number of master nodes for the cluster.
* Changing this creates a new cluster.
*/
masterCount?: pulumi.Input<number>;
/**
* The flavor for the master nodes. Can be set via
* the `OS_MAGNUM_MASTER_FLAVOR` environment variable. Changing this creates a
* new cluster.
*/
masterFlavor?: pulumi.Input<string>;
/**
* Indicates whether to create a load balancer
* for the master nodes. Changing this creates a new cluster.
*/
masterLbEnabled?: pulumi.Input<boolean>;
/**
* Indicates whether the provided labels should be
* merged with cluster template labels. Changing this creates a new cluster.
*/
mergeLabels?: pulumi.Input<boolean>;
/**
* The name of the cluster. Changing this creates a new
* cluster.
*/
name?: pulumi.Input<string>;
nodeAddresses?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The number of nodes for the cluster.
*/
nodeCount?: pulumi.Input<number>;
/**
* The project of the cluster. Required if admin wants
* to create a cluster in another project. Changing this creates a new
* cluster.
*/
projectId?: pulumi.Input<string>;
/**
* 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.
*/
region?: pulumi.Input<string>;
stackId?: pulumi.Input<string>;
updatedAt?: pulumi.Input<string>;
/**
* The user of the cluster. Required if admin wants to
* create a cluster template for another user. Changing this creates a new
* cluster.
*/
userId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Cluster resource.
*/
export interface ClusterArgs {
/**
* The UUID of the V1 Container Infra cluster
* template. Changing this creates a new cluster.
*/
clusterTemplateId?: pulumi.Input<string>;
/**
* The timeout (in minutes) for creating the
* cluster. Changing this creates a new cluster.
*/
createTimeout?: pulumi.Input<number>;
/**
* The URL used for cluster node discovery.
* Changing this creates a new cluster.
*/
discoveryUrl?: pulumi.Input<string>;
/**
* The size (in GB) of the Docker volume.
* Changing this creates a new cluster.
*/
dockerVolumeSize?: pulumi.Input<number>;
/**
* The fixed network that will be attached to the
* cluster. Changing this creates a new cluster.
*/
fixedNetwork?: pulumi.Input<string>;
/**
* The fixed subnet that will be attached to the
* cluster. Changing this creates a new cluster.
*/
fixedSubnet?: pulumi.Input<string>;
/**
* The flavor for the nodes of the cluster. Can be set via
* the `OS_MAGNUM_FLAVOR` environment variable. Changing this creates a new
* cluster.
*/
flavor?: pulumi.Input<string>;
/**
* Indicates whether floating IP should be
* created for every cluster node. Changing this creates a new cluster.
*/
floatingIpEnabled?: pulumi.Input<boolean>;
/**
* The name of the Compute service SSH keypair. Changing
* this creates a new cluster.
*/
keypair?: pulumi.Input<string>;
/**
* The list of key value pairs representing additional
* properties of the cluster. Changing this creates a new cluster.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The number of master nodes for the cluster.
* Changing this creates a new cluster.
*/
masterCount?: pulumi.Input<number>;
/**
* The flavor for the master nodes. Can be set via
* the `OS_MAGNUM_MASTER_FLAVOR` environment variable. Changing this creates a
* new cluster.
*/
masterFlavor?: pulumi.Input<string>;
/**
* Indicates whether to create a load balancer
* for the master nodes. Changing this creates a new cluster.
*/
masterLbEnabled?: pulumi.Input<boolean>;
/**
* Indicates whether the provided labels should be
* merged with cluster template labels. Changing this creates a new cluster.
*/
mergeLabels?: pulumi.Input<boolean>;
/**
* The name of the cluster. Changing this creates a new
* cluster.
*/
name?: pulumi.Input<string>;
/**
* The number of nodes for the cluster.
*/
nodeCount?: pulumi.Input<number>;
/**
* 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.
*/
region?: pulumi.Input<string>;
}