import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Add node on a cluster identified by {extId}. * * > **Note:** Starting with v2.3.2, users can now perform node add/remove operations directly through the `nutanix.ClusterV2` resource, which offers a more consistent and automated approach to managing cluster scaling operations. * * ## Example Usage * * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as nutanix from "@pierskarsenbarg/nutanix"; * * // cluster of 3 node uuid that we want to add node * const clustersExtId = "00057b8b-0b3b-4b3b-0000-000000000000"; * // for example * const cvmIp = "10.xx.xx.xx"; * //# check if the node to add is un configured or not * const cluster_node = new nutanix.ClustersDiscoverUnconfiguredNodesV2("cluster-node", { * extId: clustersExtId, * addressType: "IPV4", * ipFilterLists: [{ * ipv4s: [{ * value: cvmIp, * }], * }], * }); * //# fetch Network info for unconfigured node * const node_network_info = new nutanix.ClustersUnconfiguredNodeNetworksV2("node-network-info", { * extId: clustersExtId, * requestType: "expand_cluster", * nodeLists: [{ * cvmIps: [{ * ipv4s: [{ * value: cvmIp, * }], * }], * hypervisorIps: [{ * ipv4s: [{ * value: cluster_node.unconfiguredNodes.apply(unconfiguredNodes => unconfiguredNodes[0].hypervisorIps?.[0]?.ipv4s?.[0]?.value), * }], * }], * }], * }, { * dependsOn: [cluster_node], * }); * //# add node to the cluster * const add_node = new nutanix.ClusterAddNodeV2("add-node", { * clusterExtId: clustersExtId, * shouldSkipAddNode: false, * shouldSkipPreExpandChecks: false, * nodeParams: [{ * shouldSkipHostNetworking: false, * hypervisorIsos: [{ * type: cluster_node.unconfiguredNodes.apply(unconfiguredNodes => unconfiguredNodes[0].hypervisorType), * }], * nodeLists: [{ * nodeUuid: cluster_node.unconfiguredNodes.apply(unconfiguredNodes => unconfiguredNodes[0].nodeUuid), * model: cluster_node.unconfiguredNodes.apply(unconfiguredNodes => unconfiguredNodes[0].rackableUnitModel), * blockId: cluster_node.unconfiguredNodes.apply(unconfiguredNodes => unconfiguredNodes[0].rackableUnitSerial), * hypervisorType: cluster_node.unconfiguredNodes.apply(unconfiguredNodes => unconfiguredNodes[0].hypervisorType), * hypervisorVersion: cluster_node.unconfiguredNodes.apply(unconfiguredNodes => unconfiguredNodes[0].hypervisorVersion), * nodePosition: cluster_node.unconfiguredNodes.apply(unconfiguredNodes => unconfiguredNodes[0].nodePosition), * nosVersion: cluster_node.unconfiguredNodes.apply(unconfiguredNodes => unconfiguredNodes[0].nosVersion), * hypervisorHostname: "example", * currentNetworkInterface: node_network_info.nodesNetworkingDetails.apply(nodesNetworkingDetails => nodesNetworkingDetails[0].uplinks?.[0]?.uplinkLists?.[0]?.name), * hypervisorIps: [{ * ipv4s: [{ * value: cluster_node.unconfiguredNodes.apply(unconfiguredNodes => unconfiguredNodes[0].hypervisorIps?.[0]?.ipv4s?.[0]?.value), * }], * }], * cvmIps: [{ * ipv4s: [{ * value: cvmIp, * }], * }], * ipmiIps: [{ * ipv4s: [{ * value: cluster_node.unconfiguredNodes.apply(unconfiguredNodes => unconfiguredNodes[0].ipmiIps?.[0]?.ipv4s?.[0]?.value), * }], * }], * isRoboMixedHypervisor: true, * networks: [{ * name: node_network_info.nodesNetworkingDetails.apply(nodesNetworkingDetails => nodesNetworkingDetails[0].networkInfos?.[0]?.hcis?.[0]?.name), * networks: node_network_info.nodesNetworkingDetails.apply(nodesNetworkingDetails => nodesNetworkingDetails[0].networkInfos?.[0]?.hcis?.[0]?.networks), * uplinks: [{ * actives: [{ * name: node_network_info.nodesNetworkingDetails.apply(nodesNetworkingDetails => nodesNetworkingDetails[0].uplinks?.[0]?.uplinkLists?.[0]?.name), * mac: node_network_info.nodesNetworkingDetails.apply(nodesNetworkingDetails => nodesNetworkingDetails[0].uplinks?.[0]?.uplinkLists?.[0]?.mac), * value: node_network_info.nodesNetworkingDetails.apply(nodesNetworkingDetails => nodesNetworkingDetails[0].uplinks?.[0]?.uplinkLists?.[0]?.name), * }], * standbies: [{ * name: node_network_info.nodesNetworkingDetails.apply(nodesNetworkingDetails => nodesNetworkingDetails[0].uplinks?.[0]?.uplinkLists?.[1]?.name), * mac: node_network_info.nodesNetworkingDetails.apply(nodesNetworkingDetails => nodesNetworkingDetails[0].uplinks?.[0]?.uplinkLists?.[1]?.mac), * value: node_network_info.nodesNetworkingDetails.apply(nodesNetworkingDetails => nodesNetworkingDetails[0].uplinks?.[0]?.uplinkLists?.[1]?.name), * }], * }], * }], * }], * }], * configParams: [{ * shouldSkipImaging: true, * targetHypervisor: cluster_node.unconfiguredNodes.apply(unconfiguredNodes => unconfiguredNodes[0].hypervisorType), * }], * removeNodeParams: [{ * extraParams: [{ * shouldSkipUpgradeCheck: false, * skipSpaceCheck: false, * shouldSkipAddCheck: false, * }], * shouldSkipRemove: false, * shouldSkipPrechecks: false, * }], * }, { * dependsOn: [node_network_info], * }); * ``` * */ export declare class ClusterAddNodeV2 extends pulumi.CustomResource { /** * Get an existing ClusterAddNodeV2 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?: ClusterAddNodeV2State, opts?: pulumi.CustomResourceOptions): ClusterAddNodeV2; /** * Returns true if the given object is an instance of ClusterAddNodeV2. 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 ClusterAddNodeV2; /** * -(Required) Cluster UUID. */ readonly clusterExtId: pulumi.Output; /** * -(Optional) Config parameters. */ readonly configParams: pulumi.Output; /** * -(Required) Parameters of the node to be added. */ readonly nodeParams: pulumi.Output; /** * -(Optional) configuration for node removal. */ readonly removeNodeParams: pulumi.Output; /** * -(Optional) Indicates if node addition can be skipped. */ readonly shouldSkipAddNode: pulumi.Output; /** * -(Optional) Indicates if pre-expand checks can be skipped for node addition. */ readonly shouldSkipPreExpandChecks: pulumi.Output; /** * Create a ClusterAddNodeV2 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: ClusterAddNodeV2Args, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ClusterAddNodeV2 resources. */ export interface ClusterAddNodeV2State { /** * -(Required) Cluster UUID. */ clusterExtId?: pulumi.Input; /** * -(Optional) Config parameters. */ configParams?: pulumi.Input[] | undefined>; /** * -(Required) Parameters of the node to be added. */ nodeParams?: pulumi.Input[] | undefined>; /** * -(Optional) configuration for node removal. */ removeNodeParams?: pulumi.Input[] | undefined>; /** * -(Optional) Indicates if node addition can be skipped. */ shouldSkipAddNode?: pulumi.Input; /** * -(Optional) Indicates if pre-expand checks can be skipped for node addition. */ shouldSkipPreExpandChecks?: pulumi.Input; } /** * The set of arguments for constructing a ClusterAddNodeV2 resource. */ export interface ClusterAddNodeV2Args { /** * -(Required) Cluster UUID. */ clusterExtId: pulumi.Input; /** * -(Optional) Config parameters. */ configParams?: pulumi.Input[] | undefined>; /** * -(Required) Parameters of the node to be added. */ nodeParams: pulumi.Input[]>; /** * -(Optional) configuration for node removal. */ removeNodeParams?: pulumi.Input[] | undefined>; /** * -(Optional) Indicates if node addition can be skipped. */ shouldSkipAddNode?: pulumi.Input; /** * -(Optional) Indicates if pre-expand checks can be skipped for node addition. */ shouldSkipPreExpandChecks?: pulumi.Input; } //# sourceMappingURL=clusterAddNodeV2.d.ts.map