@upcloud/pulumi-upcloud
Version:
A Pulumi package for creating and managing UpCloud resources.
166 lines (165 loc) • 5.78 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Resource for managing UpCloud file storages. See UpCloud [File Storage](https://upcloud.com/products/file-storage/) product page for more details about the service.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as upcloud from "@upcloud/pulumi-upcloud";
*
* // Create network for the File Storage
* const _this = new upcloud.Network("this", {
* name: "file-storage-net-test",
* zone: "fi-hel2",
* ipNetwork: {
* address: "172.16.8.0/24",
* dhcp: true,
* family: "IPv4",
* },
* });
* const example = new upcloud.FileStorage("example", {
* name: "example-file-storage-test",
* size: 250,
* zone: "fi-hel2",
* configuredStatus: "stopped",
* labels: {
* environment: "staging",
* customer: "example-customer",
* },
* networks: [{
* family: "IPv4",
* name: "example-private-net",
* uuid: _this.id,
* ipAddress: "172.16.8.11",
* }],
* });
* const exampleFileStorageShare = new upcloud.FileStorageShare("example", {
* fileStorage: example.id,
* name: "write-to-project",
* path: "/project",
* });
* const exampleFileStorageShareAcl = new upcloud.FileStorageShareAcl("example", {
* fileStorage: example.id,
* shareName: exampleFileStorageShare.name,
* name: "acl-for-project",
* target: "172.16.8.12",
* permission: "rw",
* });
* ```
*/
export declare class FileStorage extends pulumi.CustomResource {
/**
* Get an existing FileStorage 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?: FileStorageState, opts?: pulumi.CustomResourceOptions): FileStorage;
/**
* Returns true if the given object is an instance of FileStorage. 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 FileStorage;
/**
* The service configured status indicates the service's current intended status. Managed by the customer.
*/
readonly configuredStatus: pulumi.Output<string>;
/**
* User defined key-value pairs to classify the file storage.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Name of the file storage service.
*/
readonly name: pulumi.Output<string>;
/**
* Network attached to this file storage (currently supports at most one of these blocks).
*/
readonly networks: pulumi.Output<outputs.FileStorageNetwork[] | undefined>;
/**
* Size of the file storage in GB.
*/
readonly size: pulumi.Output<number>;
/**
* Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`.
*/
readonly zone: pulumi.Output<string>;
/**
* Create a FileStorage 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: FileStorageArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering FileStorage resources.
*/
export interface FileStorageState {
/**
* The service configured status indicates the service's current intended status. Managed by the customer.
*/
configuredStatus?: pulumi.Input<string>;
/**
* User defined key-value pairs to classify the file storage.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Name of the file storage service.
*/
name?: pulumi.Input<string>;
/**
* Network attached to this file storage (currently supports at most one of these blocks).
*/
networks?: pulumi.Input<pulumi.Input<inputs.FileStorageNetwork>[]>;
/**
* Size of the file storage in GB.
*/
size?: pulumi.Input<number>;
/**
* Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`.
*/
zone?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a FileStorage resource.
*/
export interface FileStorageArgs {
/**
* The service configured status indicates the service's current intended status. Managed by the customer.
*/
configuredStatus: pulumi.Input<string>;
/**
* User defined key-value pairs to classify the file storage.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Name of the file storage service.
*/
name?: pulumi.Input<string>;
/**
* Network attached to this file storage (currently supports at most one of these blocks).
*/
networks?: pulumi.Input<pulumi.Input<inputs.FileStorageNetwork>[]>;
/**
* Size of the file storage in GB.
*/
size: pulumi.Input<number>;
/**
* Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`.
*/
zone: pulumi.Input<string>;
}