@pulumi/nomad
Version:
A Pulumi package for creating and managing nomad cloud resources.
287 lines (286 loc) • 11.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* ## Example Usage
*
* Creating a volume:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as nomad from "@pulumi/nomad";
*
* // It can sometimes be helpful to wait for a particular plugin to be available
* const ebs = nomad.getPlugin({
* pluginId: "aws-ebs0",
* waitForHealthy: true,
* });
* const mysqlVolume = new nomad.ExternalVolume("mysql_volume", {
* type: "csi",
* pluginId: "aws-ebs0",
* volumeId: "mysql_volume",
* name: "mysql_volume",
* capacityMin: "10GiB",
* capacityMax: "20GiB",
* capabilities: [{
* accessMode: "single-node-writer",
* attachmentMode: "file-system",
* }],
* mountOptions: {
* fsType: "ext4",
* },
* topologyRequest: {
* required: {
* topologies: [
* {
* segments: {
* rack: "R1",
* zone: "us-east-1a",
* },
* },
* {
* segments: {
* rack: "R2",
* },
* },
* ],
* },
* },
* }, {
* dependsOn: [ebs],
* });
* ```
*/
export declare class ExternalVolume extends pulumi.CustomResource {
/**
* Get an existing ExternalVolume 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?: ExternalVolumeState, opts?: pulumi.CustomResourceOptions): ExternalVolume;
/**
* Returns true if the given object is an instance of ExternalVolume. 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 ExternalVolume;
/**
* `(``Capability``: <required>)` - Options for validating the capability of a volume.
*/
readonly capabilities: pulumi.Output<outputs.ExternalVolumeCapability[]>;
/**
* `(string: <optional>)` - Option to signal a maximum volume size. This may not be supported by all storage providers.
*/
readonly capacityMax: pulumi.Output<string | undefined>;
/**
* `(string: <optional>)` - Option to signal a minimum volume size. This may not be supported by all storage providers.
*/
readonly capacityMin: pulumi.Output<string | undefined>;
/**
* `(string: <optional>)` - The external ID of an existing volume to restore. If ommited, the volume will be created from scratch. Conflicts with `snapshotId`.
*/
readonly cloneId: pulumi.Output<string | undefined>;
readonly controllerRequired: pulumi.Output<boolean>;
readonly controllersExpected: pulumi.Output<number>;
readonly controllersHealthy: pulumi.Output<number>;
/**
* `(block: optional)` Options for mounting `block-device` volumes without a pre-formatted file system.
*/
readonly mountOptions: pulumi.Output<outputs.ExternalVolumeMountOptions | undefined>;
/**
* `(string: <required>)` - The display name for the volume.
*/
readonly name: pulumi.Output<string>;
/**
* `(string: "default")` - The namespace in which to register the volume.
*/
readonly namespace: pulumi.Output<string | undefined>;
readonly nodesExpected: pulumi.Output<number>;
readonly nodesHealthy: pulumi.Output<number>;
/**
* `(map[string]string: optional)` An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
*/
readonly parameters: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* `(string: <required>)` - The ID of the Nomad plugin for registering this volume.
*/
readonly pluginId: pulumi.Output<string>;
readonly pluginProvider: pulumi.Output<string>;
readonly pluginProviderVersion: pulumi.Output<string>;
readonly schedulable: pulumi.Output<boolean>;
/**
* `(map[string]string: optional)` An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
*/
readonly secrets: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* `(string: <optional>)` - The external ID of a snapshot to restore. If ommited, the volume will be created from scratch. Conflicts with `cloneId`.
*/
readonly snapshotId: pulumi.Output<string | undefined>;
readonly topologies: pulumi.Output<outputs.ExternalVolumeTopology[]>;
/**
* `(``TopologyRequest``: <optional>)` - Specify locations (region, zone, rack, etc.) where the provisioned volume is accessible from.
*/
readonly topologyRequest: pulumi.Output<outputs.ExternalVolumeTopologyRequest | undefined>;
/**
* `(string: <required>)` - The type of the volume. Currently, only `csi` is supported.
*/
readonly type: pulumi.Output<string | undefined>;
/**
* `(string: <required>)` - The unique ID of the volume.
*/
readonly volumeId: pulumi.Output<string>;
/**
* Create a ExternalVolume 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: ExternalVolumeArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ExternalVolume resources.
*/
export interface ExternalVolumeState {
/**
* `(``Capability``: <required>)` - Options for validating the capability of a volume.
*/
capabilities?: pulumi.Input<pulumi.Input<inputs.ExternalVolumeCapability>[]>;
/**
* `(string: <optional>)` - Option to signal a maximum volume size. This may not be supported by all storage providers.
*/
capacityMax?: pulumi.Input<string>;
/**
* `(string: <optional>)` - Option to signal a minimum volume size. This may not be supported by all storage providers.
*/
capacityMin?: pulumi.Input<string>;
/**
* `(string: <optional>)` - The external ID of an existing volume to restore. If ommited, the volume will be created from scratch. Conflicts with `snapshotId`.
*/
cloneId?: pulumi.Input<string>;
controllerRequired?: pulumi.Input<boolean>;
controllersExpected?: pulumi.Input<number>;
controllersHealthy?: pulumi.Input<number>;
/**
* `(block: optional)` Options for mounting `block-device` volumes without a pre-formatted file system.
*/
mountOptions?: pulumi.Input<inputs.ExternalVolumeMountOptions>;
/**
* `(string: <required>)` - The display name for the volume.
*/
name?: pulumi.Input<string>;
/**
* `(string: "default")` - The namespace in which to register the volume.
*/
namespace?: pulumi.Input<string>;
nodesExpected?: pulumi.Input<number>;
nodesHealthy?: pulumi.Input<number>;
/**
* `(map[string]string: optional)` An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
*/
parameters?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* `(string: <required>)` - The ID of the Nomad plugin for registering this volume.
*/
pluginId?: pulumi.Input<string>;
pluginProvider?: pulumi.Input<string>;
pluginProviderVersion?: pulumi.Input<string>;
schedulable?: pulumi.Input<boolean>;
/**
* `(map[string]string: optional)` An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
*/
secrets?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* `(string: <optional>)` - The external ID of a snapshot to restore. If ommited, the volume will be created from scratch. Conflicts with `cloneId`.
*/
snapshotId?: pulumi.Input<string>;
topologies?: pulumi.Input<pulumi.Input<inputs.ExternalVolumeTopology>[]>;
/**
* `(``TopologyRequest``: <optional>)` - Specify locations (region, zone, rack, etc.) where the provisioned volume is accessible from.
*/
topologyRequest?: pulumi.Input<inputs.ExternalVolumeTopologyRequest>;
/**
* `(string: <required>)` - The type of the volume. Currently, only `csi` is supported.
*/
type?: pulumi.Input<string>;
/**
* `(string: <required>)` - The unique ID of the volume.
*/
volumeId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ExternalVolume resource.
*/
export interface ExternalVolumeArgs {
/**
* `(``Capability``: <required>)` - Options for validating the capability of a volume.
*/
capabilities: pulumi.Input<pulumi.Input<inputs.ExternalVolumeCapability>[]>;
/**
* `(string: <optional>)` - Option to signal a maximum volume size. This may not be supported by all storage providers.
*/
capacityMax?: pulumi.Input<string>;
/**
* `(string: <optional>)` - Option to signal a minimum volume size. This may not be supported by all storage providers.
*/
capacityMin?: pulumi.Input<string>;
/**
* `(string: <optional>)` - The external ID of an existing volume to restore. If ommited, the volume will be created from scratch. Conflicts with `snapshotId`.
*/
cloneId?: pulumi.Input<string>;
/**
* `(block: optional)` Options for mounting `block-device` volumes without a pre-formatted file system.
*/
mountOptions?: pulumi.Input<inputs.ExternalVolumeMountOptions>;
/**
* `(string: <required>)` - The display name for the volume.
*/
name?: pulumi.Input<string>;
/**
* `(string: "default")` - The namespace in which to register the volume.
*/
namespace?: pulumi.Input<string>;
/**
* `(map[string]string: optional)` An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
*/
parameters?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* `(string: <required>)` - The ID of the Nomad plugin for registering this volume.
*/
pluginId: pulumi.Input<string>;
/**
* `(map[string]string: optional)` An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
*/
secrets?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* `(string: <optional>)` - The external ID of a snapshot to restore. If ommited, the volume will be created from scratch. Conflicts with `cloneId`.
*/
snapshotId?: pulumi.Input<string>;
/**
* `(``TopologyRequest``: <optional>)` - Specify locations (region, zone, rack, etc.) where the provisioned volume is accessible from.
*/
topologyRequest?: pulumi.Input<inputs.ExternalVolumeTopologyRequest>;
/**
* `(string: <required>)` - The type of the volume. Currently, only `csi` is supported.
*/
type?: pulumi.Input<string>;
/**
* `(string: <required>)` - The unique ID of the volume.
*/
volumeId: pulumi.Input<string>;
}