@pulumi/vsphere
Version:
A Pulumi package for creating vsphere resources
317 lines (316 loc) • 11.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Provides a resource for configuring Workload Management.
*
* ## Example Usage
*
* ### S
*
* ### Enable Workload Management on a Compute Cluster
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vsphere from "@pulumi/vsphere";
*
* const vmClass = new vsphere.VirtualMachineClass("vm_class", {
* name: "custom-class",
* cpus: 4,
* memory: 4096,
* });
* const supervisor = new vsphere.Supervisor("supervisor", {
* cluster: "<compute_cluster_id>",
* storagePolicy: "<storage_policy_name>",
* contentLibrary: "<content_library_id>",
* mainDns: "10.0.0.250",
* workerDns: "10.0.0.250",
* edgeCluster: "<edge_cluster_id>",
* dvsUuid: "<distributed_switch_uuid>",
* sizingHint: "MEDIUM",
* managementNetwork: {
* network: "<portgroup_id>",
* subnetMask: "255.255.255.0",
* startingAddress: "10.0.0.150",
* gateway: "10.0.0.250",
* addressCount: 5,
* },
* ingressCidrs: [{
* address: "10.10.10.0",
* prefix: 24,
* }],
* egressCidrs: [{
* address: "10.10.11.0",
* prefix: 24,
* }],
* podCidrs: [{
* address: "10.244.10.0",
* prefix: 23,
* }],
* serviceCidr: {
* address: "10.10.12.0",
* prefix: 24,
* },
* searchDomains: "vsphere.local",
* namespaces: [{
* name: "custom-namespace",
* contentLibraries: [],
* vmClasses: [vmClass.id],
* }],
* });
* ```
*/
export declare class Supervisor extends pulumi.CustomResource {
/**
* Get an existing Supervisor 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?: SupervisorState, opts?: pulumi.CustomResourceOptions): Supervisor;
/**
* Returns true if the given object is an instance of Supervisor. 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 Supervisor;
/**
* The identifier of the compute cluster.
*/
readonly cluster: pulumi.Output<string>;
/**
* The identifier of the subscribed content library.
*/
readonly contentLibrary: pulumi.Output<string>;
/**
* The UUID of the distributed switch.
*/
readonly dvsUuid: pulumi.Output<string>;
/**
* The identifier of the NSX Edge Cluster.
*/
readonly edgeCluster: pulumi.Output<string>;
/**
* CIDR blocks from which NSX assigns IP addresses used for performing SNAT from container IPs to external IPs.
*/
readonly egressCidrs: pulumi.Output<outputs.SupervisorEgressCidr[]>;
/**
* CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer.
*/
readonly ingressCidrs: pulumi.Output<outputs.SupervisorIngressCidr[]>;
/**
* The list of addresses of the primary DNS servers.
*/
readonly mainDns: pulumi.Output<string[]>;
/**
* The list of addresses of the primary NTP servers.
*/
readonly mainNtps: pulumi.Output<string[]>;
/**
* The configuration for the management network which the control plane VMs will be connected to.
* * * `network` - ID of the network. (e.g. a distributed port group).
* * * `startingAddress` - Starting address of the management network range.
* * * `subnetMask` - Subnet mask.
* * * `gateway` - Gateway IP address.
* * * `addressCount` - Number of addresses to allocate. Starts from `startingAddress`
*/
readonly managementNetwork: pulumi.Output<outputs.SupervisorManagementNetwork>;
/**
* The list of namespaces to create in the Supervisor cluster
*/
readonly namespaces: pulumi.Output<outputs.SupervisorNamespace[] | undefined>;
/**
* CIDR blocks from which Kubernetes allocates pod IP addresses. Minimum subnet size is 23.
*/
readonly podCidrs: pulumi.Output<outputs.SupervisorPodCidr[]>;
/**
* List of DNS search domains.
*/
readonly searchDomains: pulumi.Output<string>;
/**
* CIDR block from which Kubernetes allocates service cluster IP addresses.
*/
readonly serviceCidr: pulumi.Output<outputs.SupervisorServiceCidr>;
/**
* The size of the Kubernetes API server.
*/
readonly sizingHint: pulumi.Output<string>;
/**
* The name of the storage policy.
*/
readonly storagePolicy: pulumi.Output<string>;
/**
* The list of addresses of the DNS servers to use for the worker nodes.
*/
readonly workerDns: pulumi.Output<string[]>;
/**
* The list of addresses of the NTP servers to use for the worker nodes.
*/
readonly workerNtps: pulumi.Output<string[]>;
/**
* Create a Supervisor 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: SupervisorArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Supervisor resources.
*/
export interface SupervisorState {
/**
* The identifier of the compute cluster.
*/
cluster?: pulumi.Input<string>;
/**
* The identifier of the subscribed content library.
*/
contentLibrary?: pulumi.Input<string>;
/**
* The UUID of the distributed switch.
*/
dvsUuid?: pulumi.Input<string>;
/**
* The identifier of the NSX Edge Cluster.
*/
edgeCluster?: pulumi.Input<string>;
/**
* CIDR blocks from which NSX assigns IP addresses used for performing SNAT from container IPs to external IPs.
*/
egressCidrs?: pulumi.Input<pulumi.Input<inputs.SupervisorEgressCidr>[]>;
/**
* CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer.
*/
ingressCidrs?: pulumi.Input<pulumi.Input<inputs.SupervisorIngressCidr>[]>;
/**
* The list of addresses of the primary DNS servers.
*/
mainDns?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The list of addresses of the primary NTP servers.
*/
mainNtps?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The configuration for the management network which the control plane VMs will be connected to.
* * * `network` - ID of the network. (e.g. a distributed port group).
* * * `startingAddress` - Starting address of the management network range.
* * * `subnetMask` - Subnet mask.
* * * `gateway` - Gateway IP address.
* * * `addressCount` - Number of addresses to allocate. Starts from `startingAddress`
*/
managementNetwork?: pulumi.Input<inputs.SupervisorManagementNetwork>;
/**
* The list of namespaces to create in the Supervisor cluster
*/
namespaces?: pulumi.Input<pulumi.Input<inputs.SupervisorNamespace>[]>;
/**
* CIDR blocks from which Kubernetes allocates pod IP addresses. Minimum subnet size is 23.
*/
podCidrs?: pulumi.Input<pulumi.Input<inputs.SupervisorPodCidr>[]>;
/**
* List of DNS search domains.
*/
searchDomains?: pulumi.Input<string>;
/**
* CIDR block from which Kubernetes allocates service cluster IP addresses.
*/
serviceCidr?: pulumi.Input<inputs.SupervisorServiceCidr>;
/**
* The size of the Kubernetes API server.
*/
sizingHint?: pulumi.Input<string>;
/**
* The name of the storage policy.
*/
storagePolicy?: pulumi.Input<string>;
/**
* The list of addresses of the DNS servers to use for the worker nodes.
*/
workerDns?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The list of addresses of the NTP servers to use for the worker nodes.
*/
workerNtps?: pulumi.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a Supervisor resource.
*/
export interface SupervisorArgs {
/**
* The identifier of the compute cluster.
*/
cluster: pulumi.Input<string>;
/**
* The identifier of the subscribed content library.
*/
contentLibrary: pulumi.Input<string>;
/**
* The UUID of the distributed switch.
*/
dvsUuid: pulumi.Input<string>;
/**
* The identifier of the NSX Edge Cluster.
*/
edgeCluster: pulumi.Input<string>;
/**
* CIDR blocks from which NSX assigns IP addresses used for performing SNAT from container IPs to external IPs.
*/
egressCidrs: pulumi.Input<pulumi.Input<inputs.SupervisorEgressCidr>[]>;
/**
* CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer.
*/
ingressCidrs: pulumi.Input<pulumi.Input<inputs.SupervisorIngressCidr>[]>;
/**
* The list of addresses of the primary DNS servers.
*/
mainDns: pulumi.Input<pulumi.Input<string>[]>;
/**
* The list of addresses of the primary NTP servers.
*/
mainNtps: pulumi.Input<pulumi.Input<string>[]>;
/**
* The configuration for the management network which the control plane VMs will be connected to.
* * * `network` - ID of the network. (e.g. a distributed port group).
* * * `startingAddress` - Starting address of the management network range.
* * * `subnetMask` - Subnet mask.
* * * `gateway` - Gateway IP address.
* * * `addressCount` - Number of addresses to allocate. Starts from `startingAddress`
*/
managementNetwork: pulumi.Input<inputs.SupervisorManagementNetwork>;
/**
* The list of namespaces to create in the Supervisor cluster
*/
namespaces?: pulumi.Input<pulumi.Input<inputs.SupervisorNamespace>[]>;
/**
* CIDR blocks from which Kubernetes allocates pod IP addresses. Minimum subnet size is 23.
*/
podCidrs: pulumi.Input<pulumi.Input<inputs.SupervisorPodCidr>[]>;
/**
* List of DNS search domains.
*/
searchDomains: pulumi.Input<string>;
/**
* CIDR block from which Kubernetes allocates service cluster IP addresses.
*/
serviceCidr: pulumi.Input<inputs.SupervisorServiceCidr>;
/**
* The size of the Kubernetes API server.
*/
sizingHint: pulumi.Input<string>;
/**
* The name of the storage policy.
*/
storagePolicy: pulumi.Input<string>;
/**
* The list of addresses of the DNS servers to use for the worker nodes.
*/
workerDns: pulumi.Input<pulumi.Input<string>[]>;
/**
* The list of addresses of the NTP servers to use for the worker nodes.
*/
workerNtps: pulumi.Input<pulumi.Input<string>[]>;
}