UNPKG

@pulumi/nomad

Version:

A Pulumi package for creating and managing nomad cloud resources.

226 lines (225 loc) 9.5 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Registers a dynamic host volume in Nomad that has already been created. Note * that Nomad supports two workflows for dynamic host volumes: create and * register. Both resources result in the same data source with the same outputs. */ export declare class DynamicHostVolumeRegistration extends pulumi.CustomResource { /** * Get an existing DynamicHostVolumeRegistration 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?: DynamicHostVolumeRegistrationState, opts?: pulumi.CustomResourceOptions): DynamicHostVolumeRegistration; /** * Returns true if the given object is an instance of DynamicHostVolumeRegistration. 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 DynamicHostVolumeRegistration; /** * `(block: <optional>)` - Option for validating the capability of a * volume. Each capability block has the following attributes: */ readonly capabilities: pulumi.Output<outputs.DynamicHostVolumeRegistrationCapability[]>; /** * `(string: <optional>)` - The size of a volume in bytes. Either the * physical size of a disk or a quota, depending on the plugin. This field must * be between the `capacityMin` and `capacityMax` values unless they are * omitted. Accepts human-friendly suffixes such as `"100GiB"`. */ readonly capacity: pulumi.Output<string | undefined>; readonly capacityBytes: pulumi.Output<number>; readonly capacityMaxBytes: pulumi.Output<number>; readonly capacityMinBytes: pulumi.Output<number>; /** * Constraints */ readonly constraints: pulumi.Output<outputs.DynamicHostVolumeRegistrationConstraint[]>; /** * `(string)` - The path on disk where the volume exists. */ readonly hostPath: pulumi.Output<string>; /** * `(string: <required>)` - The name of the volume, which is used as the * [`volume.source`][volumeSource] field in job specifications that claim this * volume. Host volume names must be unique per node. Names are visible to any * user with `node:read` ACL, even across namespaces, so they should not be * treated as sensitive values. */ readonly name: pulumi.Output<string>; /** * `(string: <optional>)` - The namespace of the volume. This field * overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE` * environment variable. Defaults to `"default"` if unset. */ readonly namespace: pulumi.Output<string | undefined>; /** * `(string: <required>)` - A specific node where the volume is * mounted. */ readonly nodeId: pulumi.Output<string>; /** * Node pool */ readonly nodePool: pulumi.Output<string>; /** * `(map<string|string>: <optional>)` - A key-value map of strings * passed directly to the plugin to configure the volume. The details of these * parameters are specific to the plugin. * * * [`accessMode`]: /nomad/docs/other-specifications/volume/capability#access_mode * [`attachmentMode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode * [volumeSource]: /nomad/docs/job-specification/volume#source */ readonly parameters: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Plugin ID */ readonly pluginId: pulumi.Output<string>; /** * State */ readonly state: pulumi.Output<string>; /** * Create a DynamicHostVolumeRegistration 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: DynamicHostVolumeRegistrationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DynamicHostVolumeRegistration resources. */ export interface DynamicHostVolumeRegistrationState { /** * `(block: <optional>)` - Option for validating the capability of a * volume. Each capability block has the following attributes: */ capabilities?: pulumi.Input<pulumi.Input<inputs.DynamicHostVolumeRegistrationCapability>[]>; /** * `(string: <optional>)` - The size of a volume in bytes. Either the * physical size of a disk or a quota, depending on the plugin. This field must * be between the `capacityMin` and `capacityMax` values unless they are * omitted. Accepts human-friendly suffixes such as `"100GiB"`. */ capacity?: pulumi.Input<string>; capacityBytes?: pulumi.Input<number>; capacityMaxBytes?: pulumi.Input<number>; capacityMinBytes?: pulumi.Input<number>; /** * Constraints */ constraints?: pulumi.Input<pulumi.Input<inputs.DynamicHostVolumeRegistrationConstraint>[]>; /** * `(string)` - The path on disk where the volume exists. */ hostPath?: pulumi.Input<string>; /** * `(string: <required>)` - The name of the volume, which is used as the * [`volume.source`][volumeSource] field in job specifications that claim this * volume. Host volume names must be unique per node. Names are visible to any * user with `node:read` ACL, even across namespaces, so they should not be * treated as sensitive values. */ name?: pulumi.Input<string>; /** * `(string: <optional>)` - The namespace of the volume. This field * overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE` * environment variable. Defaults to `"default"` if unset. */ namespace?: pulumi.Input<string>; /** * `(string: <required>)` - A specific node where the volume is * mounted. */ nodeId?: pulumi.Input<string>; /** * Node pool */ nodePool?: pulumi.Input<string>; /** * `(map<string|string>: <optional>)` - A key-value map of strings * passed directly to the plugin to configure the volume. The details of these * parameters are specific to the plugin. * * * [`accessMode`]: /nomad/docs/other-specifications/volume/capability#access_mode * [`attachmentMode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode * [volumeSource]: /nomad/docs/job-specification/volume#source */ parameters?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Plugin ID */ pluginId?: pulumi.Input<string>; /** * State */ state?: pulumi.Input<string>; } /** * The set of arguments for constructing a DynamicHostVolumeRegistration resource. */ export interface DynamicHostVolumeRegistrationArgs { /** * `(block: <optional>)` - Option for validating the capability of a * volume. Each capability block has the following attributes: */ capabilities: pulumi.Input<pulumi.Input<inputs.DynamicHostVolumeRegistrationCapability>[]>; /** * `(string: <optional>)` - The size of a volume in bytes. Either the * physical size of a disk or a quota, depending on the plugin. This field must * be between the `capacityMin` and `capacityMax` values unless they are * omitted. Accepts human-friendly suffixes such as `"100GiB"`. */ capacity?: pulumi.Input<string>; /** * `(string)` - The path on disk where the volume exists. */ hostPath: pulumi.Input<string>; /** * `(string: <required>)` - The name of the volume, which is used as the * [`volume.source`][volumeSource] field in job specifications that claim this * volume. Host volume names must be unique per node. Names are visible to any * user with `node:read` ACL, even across namespaces, so they should not be * treated as sensitive values. */ name?: pulumi.Input<string>; /** * `(string: <optional>)` - The namespace of the volume. This field * overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE` * environment variable. Defaults to `"default"` if unset. */ namespace?: pulumi.Input<string>; /** * `(string: <required>)` - A specific node where the volume is * mounted. */ nodeId: pulumi.Input<string>; /** * `(map<string|string>: <optional>)` - A key-value map of strings * passed directly to the plugin to configure the volume. The details of these * parameters are specific to the plugin. * * * [`accessMode`]: /nomad/docs/other-specifications/volume/capability#access_mode * [`attachmentMode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode * [volumeSource]: /nomad/docs/job-specification/volume#source */ parameters?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; }