@pulumi/hcloud
Version:
A Pulumi package for creating and managing hcloud cloud resources.
113 lines • 3.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a Hetzner Cloud Placement Group to represent a Placement Group in the Hetzner Cloud.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as hcloud from "@pulumi/hcloud";
*
* const my_placement_group = new hcloud.PlacementGroup("my-placement-group", {
* name: "my-placement-group",
* type: "spread",
* labels: {
* key: "value",
* },
* });
* const node1 = new hcloud.Server("node1", {
* name: "node1",
* image: "debian-12",
* serverType: "cx23",
* placementGroupId: my_placement_group.id.apply(x =>Number(x)),
* });
* ```
*
* ## Import
*
* Placement Groups can be imported using its `id`:
*
* ```sh
* $ pulumi import hcloud:index/placementGroup:PlacementGroup example "$PLACEMENT_GROUP_ID"
* ```
*/
export declare class PlacementGroup extends pulumi.CustomResource {
/**
* Get an existing PlacementGroup 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?: PlacementGroupState, opts?: pulumi.CustomResourceOptions): PlacementGroup;
/**
* Returns true if the given object is an instance of PlacementGroup. 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 PlacementGroup;
/**
* User-defined labels (key-value pairs) should be created with.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Name of the Placement Group.
*/
readonly name: pulumi.Output<string>;
readonly servers: pulumi.Output<number[]>;
/**
* Type of the Placement Group.
*/
readonly type: pulumi.Output<string>;
/**
* Create a PlacementGroup 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: PlacementGroupArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering PlacementGroup resources.
*/
export interface PlacementGroupState {
/**
* User-defined labels (key-value pairs) should be created with.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* Name of the Placement Group.
*/
name?: pulumi.Input<string | undefined>;
servers?: pulumi.Input<pulumi.Input<number>[] | undefined>;
/**
* Type of the Placement Group.
*/
type?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a PlacementGroup resource.
*/
export interface PlacementGroupArgs {
/**
* User-defined labels (key-value pairs) should be created with.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* Name of the Placement Group.
*/
name?: pulumi.Input<string | undefined>;
/**
* Type of the Placement Group.
*/
type: pulumi.Input<string>;
}
//# sourceMappingURL=placementGroup.d.ts.map