import * as pulumi from "@pulumi/pulumi"; /** * Provides information on UpCloud [Block Storage](https://upcloud.com/products/block-storage) devices. * * Data source can be used to map storage to other resource based on the ID or just to read some other storage property like zone information. Storage types are: `normal`, `backup`, `cdrom`, and `template`. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as upcloud from "@upcloud/pulumi-upcloud"; * * // Build server with your latest custom image * // * // Note that when applied new updated image will cause replacement of the old server (debian.example.tld) * // with the new server created based on the updated image.This can cause posible data loss * // if it hasn't been taken into account when planning the service. * const appImage = upcloud.getStorage({ * type: "template", * nameRegex: "^app_image.*", * mostRecent: true, * }); * const example = new upcloud.Server("example", { * hostname: "debian.example.tld", * zone: "fi-hel1", * networkInterfaces: [{ * type: "public", * }], * template: { * storage: appImage.then(appImage => appImage.id), * }, * }); * // Build only new servers with your latest custom image * // * // Use the lifecycle meta-argument to ignore changes in server's template triggered by new image version * const example2 = new upcloud.Server("example2", { * hostname: "debian.example2.tld", * zone: "fi-hel1", * networkInterfaces: [{ * type: "public", * }], * template: { * storage: appImage.then(appImage => appImage.id), * }, * }); * ``` */ export declare function getStorage(args?: GetStorageArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getStorage. */ export interface GetStorageArgs { accessType?: string; id?: string; /** * @deprecated Use exact title or UUID to limit the number of matching storages. Note that if you have multiple storages with the same title, you should use UUID to select the storage. */ mostRecent?: boolean; /** * @deprecated Contains the same value as `title`. Use `title` instead. */ name?: string; /** * @deprecated Use exact title or UUID instead. */ nameRegex?: string; title?: string; type?: string; zone?: string; } /** * A collection of values returned by getStorage. */ export interface GetStorageResult { readonly accessType: string; readonly encrypt: boolean; readonly id: string; readonly labels: { [key: string]: string; }; /** * @deprecated Use exact title or UUID to limit the number of matching storages. Note that if you have multiple storages with the same title, you should use UUID to select the storage. */ readonly mostRecent?: boolean; /** * @deprecated Contains the same value as `title`. Use `title` instead. */ readonly name?: string; /** * @deprecated Use exact title or UUID instead. */ readonly nameRegex?: string; readonly size: number; readonly state: string; readonly systemLabels: { [key: string]: string; }; readonly tier: string; readonly title: string; readonly type: string; readonly zone: string; } /** * Provides information on UpCloud [Block Storage](https://upcloud.com/products/block-storage) devices. * * Data source can be used to map storage to other resource based on the ID or just to read some other storage property like zone information. Storage types are: `normal`, `backup`, `cdrom`, and `template`. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as upcloud from "@upcloud/pulumi-upcloud"; * * // Build server with your latest custom image * // * // Note that when applied new updated image will cause replacement of the old server (debian.example.tld) * // with the new server created based on the updated image.This can cause posible data loss * // if it hasn't been taken into account when planning the service. * const appImage = upcloud.getStorage({ * type: "template", * nameRegex: "^app_image.*", * mostRecent: true, * }); * const example = new upcloud.Server("example", { * hostname: "debian.example.tld", * zone: "fi-hel1", * networkInterfaces: [{ * type: "public", * }], * template: { * storage: appImage.then(appImage => appImage.id), * }, * }); * // Build only new servers with your latest custom image * // * // Use the lifecycle meta-argument to ignore changes in server's template triggered by new image version * const example2 = new upcloud.Server("example2", { * hostname: "debian.example2.tld", * zone: "fi-hel1", * networkInterfaces: [{ * type: "public", * }], * template: { * storage: appImage.then(appImage => appImage.id), * }, * }); * ``` */ export declare function getStorageOutput(args?: GetStorageOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getStorage. */ export interface GetStorageOutputArgs { accessType?: pulumi.Input; id?: pulumi.Input; /** * @deprecated Use exact title or UUID to limit the number of matching storages. Note that if you have multiple storages with the same title, you should use UUID to select the storage. */ mostRecent?: pulumi.Input; /** * @deprecated Contains the same value as `title`. Use `title` instead. */ name?: pulumi.Input; /** * @deprecated Use exact title or UUID instead. */ nameRegex?: pulumi.Input; title?: pulumi.Input; type?: pulumi.Input; zone?: pulumi.Input; }