@muhlba91/pulumi-proxmoxve
Version:
A Pulumi package for creating and managing Proxmox Virtual Environment cloud resources.
117 lines • 3.81 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages resource pool memberships for containers, virtual machines and storages
*
* > This resource requires the `Pool.Allocate` permission on the pool path (e.g., `/pool/{poolid}`).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
*
* const testVm1 = new proxmoxve.Vm("test_vm1", {
* vmId: 1234,
* nodeName: "pve",
* started: false,
* });
* const testPool = new proxmoxve.PoolLegacy("test_pool", {poolId: "test-pool"});
* const vmMembership = new proxmoxve.pool.Membership("vm_membership", {
* poolId: testPool.id,
* vmId: testVm1.resourceId.apply(x =>Number(x)),
* });
* const storageMembership = new proxmoxve.pool.Membership("storage_membership", {
* poolId: testPool.id,
* storageId: "local-lvm",
* });
* ```
*
* ## Import
*
* !/usr/bin/env sh
* Resource pool membership can be imported using its unique identifier, e.g.: {pool_id}/{type}/{member_id}
*
* ```sh
* $ pulumi import proxmoxve:pool/membership:Membership example_membership test-pool/vm/102
* ```
*/
export declare class Membership extends pulumi.CustomResource {
/**
* Get an existing Membership 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?: MembershipState, opts?: pulumi.CustomResourceOptions): Membership;
/**
* Returns true if the given object is an instance of Membership. 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 Membership;
/**
* Resource pool id
*/
readonly poolId: pulumi.Output<string>;
/**
* Storage id
*/
readonly storageId: pulumi.Output<string | undefined>;
/**
* Resource pool membership type (can be `vm` for VMs and CTs or `storage` for storages)
*/
readonly type: pulumi.Output<string>;
/**
* VM or CT id
*/
readonly vmId: pulumi.Output<number | undefined>;
/**
* Create a Membership 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: MembershipArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Membership resources.
*/
export interface MembershipState {
/**
* Resource pool id
*/
poolId?: pulumi.Input<string | undefined>;
/**
* Storage id
*/
storageId?: pulumi.Input<string | undefined>;
/**
* Resource pool membership type (can be `vm` for VMs and CTs or `storage` for storages)
*/
type?: pulumi.Input<string | undefined>;
/**
* VM or CT id
*/
vmId?: pulumi.Input<number | undefined>;
}
/**
* The set of arguments for constructing a Membership resource.
*/
export interface MembershipArgs {
/**
* Resource pool id
*/
poolId: pulumi.Input<string>;
/**
* Storage id
*/
storageId?: pulumi.Input<string | undefined>;
/**
* VM or CT id
*/
vmId?: pulumi.Input<number | undefined>;
}
//# sourceMappingURL=membership.d.ts.map