import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Represents the Cluster entity. Provides the basic infrastructure for compute, storage and networking. This includes the operations that can be carried out on cluster and its subresources - host (node), rsyslog servers etc and actions that can be performed on cluster - add a node, remove a node, attach categories. * * > **Recommendations:** It is recommended to create and register the cluster with Prism Central as part of the same workflow. Cluster updates, importing, and destruction through Terraform are supported only when the cluster is registered with Prism Central. To register a cluster with Prism Central use Terraform resource nutanix_pc_registration_v2. * * > **Note:**: Cluster resource supports add/remove node operations. However, these operations require cluster to be registered with Prism Central. * * > **Note:**: TThe cluster resource supports both associating and disassociating categories, allowing you to attach or detach categories on a cluster through Terraform. However, these operations require cluster to be registered with Prism Central. * * **Note:**: The cluster resource supports both associating and disassociating cluster profile, allowing you to attach or detach cluster profile on a cluster through Terraform. However, these operations require cluster to be registered with Prism Central. * * ## Example Usage * * ### * * ### Example 1: 1 Node Cluster Creation Example * * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as nutanix from "@pierskarsenbarg/nutanix"; * * const cluster = new nutanix.ClusterV2("cluster", { * name: "cluster-example", * nodes: [{ * nodeLists: [{ * controllerVmIps: [{ * ipv4s: [{ * value: "10.xx.xx.xx", * }], * }], * }], * }], * configs: [{ * clusterFunctions: ["AOS"], * redundancyFactor: 1, * clusterArch: "X86_64", * faultToleranceStates: [{ * domainAwarenessLevel: "DISK", * }], * }], * networks: [{ * externalAddresses: [{ * ipv4s: [{ * value: "10.xx.xx.xx", * }], * }], * externalDataServicesIps: [{ * ipv4s: [{ * value: "10.xx.xx.xx", * }], * }], * ntpServerIpLists: [ * { * fqdns: [{ * value: "ntp.server.nutanix.com", * }], * }, * { * fqdns: [{ * value: "ntp.server_1.nutanix.com", * }], * }, * ], * smtpServers: [{ * emailAddress: "example.ex@exmple.com", * servers: [{ * ipAddresses: [{ * ipv4s: [{ * value: "10.xx.xx.xx", * }], * }], * port: 123, * username: "example", * password: "example!2134", * }], * type: "PLAIN", * }], * }], * }); * ``` * * * ### Example 2: 3 Node Cluster Creation Example and Adding Nodes Example * * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as nutanix from "@pierskarsenbarg/nutanix"; * * const cluster_3nodes = new nutanix.ClusterV2("cluster-3nodes", { * name: "tf-cluster-3nodes", * dryrun: false, * nodes: [{ * nodeLists: [ * { * controllerVmIps: [{ * ipv4s: [{ * value: "10.00.00.1", * }], * }], * }, * { * controllerVmIps: [{ * ipv4s: [{ * value: "10.00.00.2", * }], * }], * }, * { * controllerVmIps: [{ * ipv4s: [{ * value: "10.00.00.3", * }], * }], * }, * ], * }], * configs: [{ * clusterFunctions: clusters.config.clusterFunctions, * clusterArch: clusters.config.clusterArch, * faultToleranceStates: [{ * domainAwarenessLevel: "NODE", * }], * }], * }); * ``` * * * ### Example 3: Creating a cluster with categories * * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as nutanix from "@pierskarsenbarg/nutanix"; * * const cluster_with_categories = new nutanix.ClusterV2("cluster-with-categories", { * name: "cluster-example", * nodes: [{ * nodeLists: [{ * controllerVmIps: [{ * ipv4s: [{ * value: "10.xx.xx.xx", * }], * }], * }], * }], * configs: [{ * clusterFunctions: ["AOS"], * redundancyFactor: 1, * clusterArch: "X86_64", * faultToleranceStates: [{ * domainAwarenessLevel: "DISK", * }], * }], * networks: [{ * externalAddresses: [{ * ipv4s: [{ * value: "10.xx.xx.xx", * }], * }], * externalDataServicesIps: [{ * ipv4s: [{ * value: "10.xx.xx.xx", * }], * }], * ntpServerIpLists: [ * { * fqdns: [{ * value: "ntp.server.nutanix.com", * }], * }, * { * fqdns: [{ * value: "ntp.server_1.nutanix.com", * }], * }, * ], * smtpServers: [{ * emailAddress: "example.ex@exmple.com", * servers: [{ * ipAddresses: [{ * ipv4s: [{ * value: "10.xx.xx.xx", * }], * }], * port: 123, * username: "example", * password: "example!2134", * }], * type: "PLAIN", * }], * }], * }); * ``` * * * ## What happens when you do terraform destroy for nutanix_clusters_v2? First thing, inorder to destroy the cluster from Terraform it need to be registered. * * See detailed information in [Nutanix Create Cluster V4](https://developers.nutanix.com/api-reference?namespace=clustermgmt&version=v4.2#tag/Clusters/operation/createCluster). */ export declare class ClusterV2 extends pulumi.CustomResource { /** * Get an existing ClusterV2 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, state?: ClusterV2State, opts?: pulumi.CustomResourceOptions): ClusterV2; /** * Returns true if the given object is an instance of ClusterV2. 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 ClusterV2; readonly backupEligibilityScore: pulumi.Output; /** * - (Optional) The reference to a project. */ readonly categories: pulumi.Output; /** * - (Optional) The reference to a cluster profile. */ readonly clusterProfileExtId: pulumi.Output; /** * - (Optional) Cluster configuration details. */ readonly configs: pulumi.Output; /** * - (Optional) The name of the default container created as part of cluster creation. This is part of payload for cluster create operation only. */ readonly containerName: pulumi.Output; /** * - (Optional) parameter that allows long-running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true. */ readonly dryrun: pulumi.Output; readonly expand: pulumi.Output; readonly extId: pulumi.Output; readonly inefficientVmCount: pulumi.Output; readonly links: pulumi.Output; /** * - (Required) The name for the vm. */ readonly name: pulumi.Output; /** * - (Optional) Network details of a cluster. */ readonly networks: pulumi.Output; /** * - (Optional) The reference to a node and remove node parameters. */ readonly nodes: pulumi.Output; readonly tenantId: pulumi.Output; /** * - (Optional) Upgrade status of a cluster. * Valid values are: * - "CANCELLED" The cluster upgrade is cancelled. * - "FAILED" The cluster upgrade failed. * - "QUEUED" The cluster upgrade is in the queue. * - "SUCCEEDED" The cluster was upgraded successfully. * - "DOWNLOADING" The cluster upgrade is downloading. * - "PENDING" The cluster upgrade is in pending state. * - "UPGRADING" The cluster is in upgrade state. * - "PREUPGRADE" The cluster is in pre-upgrade state. * - "SCHEDULED" The cluster upgrade is in scheduled state. */ readonly upgradeStatus: pulumi.Output; readonly vmCount: pulumi.Output; /** * Create a ClusterV2 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?: ClusterV2Args, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ClusterV2 resources. */ export interface ClusterV2State { backupEligibilityScore?: pulumi.Input; /** * - (Optional) The reference to a project. */ categories?: pulumi.Input[] | undefined>; /** * - (Optional) The reference to a cluster profile. */ clusterProfileExtId?: pulumi.Input; /** * - (Optional) Cluster configuration details. */ configs?: pulumi.Input[] | undefined>; /** * - (Optional) The name of the default container created as part of cluster creation. This is part of payload for cluster create operation only. */ containerName?: pulumi.Input; /** * - (Optional) parameter that allows long-running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true. */ dryrun?: pulumi.Input; expand?: pulumi.Input; extId?: pulumi.Input; inefficientVmCount?: pulumi.Input; links?: pulumi.Input[] | undefined>; /** * - (Required) The name for the vm. */ name?: pulumi.Input; /** * - (Optional) Network details of a cluster. */ networks?: pulumi.Input[] | undefined>; /** * - (Optional) The reference to a node and remove node parameters. */ nodes?: pulumi.Input[] | undefined>; tenantId?: pulumi.Input; /** * - (Optional) Upgrade status of a cluster. * Valid values are: * - "CANCELLED" The cluster upgrade is cancelled. * - "FAILED" The cluster upgrade failed. * - "QUEUED" The cluster upgrade is in the queue. * - "SUCCEEDED" The cluster was upgraded successfully. * - "DOWNLOADING" The cluster upgrade is downloading. * - "PENDING" The cluster upgrade is in pending state. * - "UPGRADING" The cluster is in upgrade state. * - "PREUPGRADE" The cluster is in pre-upgrade state. * - "SCHEDULED" The cluster upgrade is in scheduled state. */ upgradeStatus?: pulumi.Input; vmCount?: pulumi.Input; } /** * The set of arguments for constructing a ClusterV2 resource. */ export interface ClusterV2Args { /** * - (Optional) The reference to a project. */ categories?: pulumi.Input[] | undefined>; /** * - (Optional) The reference to a cluster profile. */ clusterProfileExtId?: pulumi.Input; /** * - (Optional) Cluster configuration details. */ configs?: pulumi.Input[] | undefined>; /** * - (Optional) The name of the default container created as part of cluster creation. This is part of payload for cluster create operation only. */ containerName?: pulumi.Input; /** * - (Optional) parameter that allows long-running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true. */ dryrun?: pulumi.Input; expand?: pulumi.Input; extId?: pulumi.Input; /** * - (Required) The name for the vm. */ name?: pulumi.Input; /** * - (Optional) Network details of a cluster. */ networks?: pulumi.Input[] | undefined>; /** * - (Optional) The reference to a node and remove node parameters. */ nodes?: pulumi.Input[] | undefined>; } //# sourceMappingURL=clusterV2.d.ts.map