UNPKG

@natzka-oss/pulumi-netbox

Version:

A Pulumi package for creating and managing Netbox cloud resources.

87 lines (86 loc) 3.94 kB
import * as pulumi from "@pulumi/pulumi"; /** * From the [official documentation](https://docs.netbox.dev/en/stable/features/virtualization/#clusters): * * > A cluster is a logical grouping of physical resources within which virtual machines run. A cluster must be assigned a type (technological classification), and may optionally be assigned to a cluster group, site, and/or tenant. Each cluster must have a unique name within its assigned group and/or site, if any. * > * > Physical devices may be associated with clusters as hosts. This allows users to track on which host(s) a particular virtual machine may reside. However, NetBox does not support pinning a specific VM within a cluster to a particular host device. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as netbox from "@natzka-oss/pulumi-netbox"; * import * as netbox from "@pulumi/netbox"; * * // Assumes the 'dc-west' cluster group already exists * const dcWest = netbox.virt.getClusterGroup({ * name: "dc-west", * }); * const vmwVsphere = new netbox.virt.ClusterType("vmw_vsphere", {name: "VMware vSphere 6"}); * const vmwCluster01 = new netbox.virt.Cluster("vmw_cluster_01", { * clusterTypeId: vmwVsphere.id, * name: "vmw-cluster-01", * clusterGroupId: dcWest.then(dcWest => dcWest.id), * }); * ``` */ 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 clusterGroupId: pulumi.Output<number | undefined>; readonly clusterTypeId: pulumi.Output<number>; readonly comments: pulumi.Output<string | undefined>; readonly description: pulumi.Output<string | undefined>; readonly name: pulumi.Output<string>; readonly siteId: pulumi.Output<number | undefined>; readonly tags: pulumi.Output<string[] | undefined>; readonly tenantId: pulumi.Output<number | undefined>; /** * 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 { clusterGroupId?: pulumi.Input<number>; clusterTypeId?: pulumi.Input<number>; comments?: pulumi.Input<string>; description?: pulumi.Input<string>; name?: pulumi.Input<string>; siteId?: pulumi.Input<number>; tags?: pulumi.Input<pulumi.Input<string>[]>; tenantId?: pulumi.Input<number>; } /** * The set of arguments for constructing a Cluster resource. */ export interface ClusterArgs { clusterGroupId?: pulumi.Input<number>; clusterTypeId: pulumi.Input<number>; comments?: pulumi.Input<string>; description?: pulumi.Input<string>; name?: pulumi.Input<string>; siteId?: pulumi.Input<number>; tags?: pulumi.Input<pulumi.Input<string>[]>; tenantId?: pulumi.Input<number>; }