UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

386 lines (385 loc) 15.3 kB
import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../types"; /** * !> **WARNING:** It has been deprecated. * * Provides a Shared File System (SFS) resource within HuaweiCloud. * * ## Example Usage * ### Basic example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const shareName = config.requireObject("shareName"); * const shareDescription = config.requireObject("shareDescription"); * const vpcId = config.requireObject("vpcId"); * const share_file = new huaweicloud.sfs.FileSystem("share-file", { * size: 100, * shareProto: "NFS", * accessLevel: "rw", * accessTo: vpcId, * description: shareDescription, * tags: { * key: "value", * }, * }); * ``` * ### SFS with data encryption * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const shareName = config.requireObject("shareName"); * const shareDescription = config.requireObject("shareDescription"); * const vpcId = config.requireObject("vpcId"); * const share_file = new huaweicloud.sfs.FileSystem("share-file", { * size: 100, * shareProto: "NFS", * accessLevel: "rw", * accessTo: vpcId, * description: shareDescription, * metadata: { * "#sfs_crypt_key_id": huaweicloud_kms_key.mykey.id, * "#sfs_crypt_domain_id": huaweicloud_kms_key.mykey.domain_id, * "#sfs_crypt_alias": huaweicloud_kms_key.mykey.key_alias, * }, * tags: { * "function": "encryption", * }, * }); * ``` * ### SFS with Auto Capacity Expansion * * > This feature is only supported in specific regions. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const shareName = config.requireObject("shareName"); * const share_file = new huaweicloud.sfs.FileSystem("share-file", { * size: 100, * shareProto: "NFS", * description: "auto capacity expansion", * metadata: { * "#sfs_quota_type": "soft", * }, * }); * ``` * * ## Import * * SFS can be imported using the `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:Sfs/fileSystem:FileSystem huaweicloud_sfs_file_system 4779ab1c-7c1a-44b1-a02e-93dfc361b32d * ``` * * [huaweicloud_sfs_access_rule](https://registry.terraform.io/providers/huaweicloud/huaweicloud/latest/docs/resources/sfs_access_rule). */ export declare class FileSystem extends pulumi.CustomResource { /** * Get an existing FileSystem 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?: FileSystemState, opts?: pulumi.CustomResourceOptions): FileSystem; /** * Returns true if the given object is an instance of FileSystem. 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 FileSystem; /** * Specifies the access level of the shared file system. Possible values are *ro* ( * read-only) * and *rw* (read-write). The default value is *rw* (read/write). Changing this will create a new access rule. */ readonly accessLevel: pulumi.Output<string>; /** * The status of the share access rule. */ readonly accessRuleStatus: pulumi.Output<string>; /** * All access rules of the shared file system. The object includes the following: */ readonly accessRules: pulumi.Output<outputs.Sfs.FileSystemAccessRule[]>; /** * Specifies the value that defines the access rule. The value contains 1 to 255 * characters. Changing this will create a new access rule. The value varies according to the scenario: * + Set the VPC ID in VPC authorization scenarios. * + Set this parameter in IP address authorization scenario: * - For an NFS shared file system, the value in the format of *VPC_ID#IP_address#priority#user_permission*. * For example, 0157b53f-4974-4e80-91c9-098532bcaf00#2.2.2.2/16#100#all_squash,root_squash. * - For a CIFS shared file system, the value in the format of *VPC_ID#IP_address#priority*. * For example, 0157b53f-4974-4e80-91c9-098532bcaf00#2.2.2.2/16#0. */ readonly accessTo: pulumi.Output<string | undefined>; /** * Specifies the type of the share access rule. The default value is *cert*. Changing * this will create a new access rule. */ readonly accessType: pulumi.Output<string>; /** * Specifies the availability zone name. Changing this parameter will * create a new resource. */ readonly availabilityZone: pulumi.Output<string>; /** * Specifies the description of the shared file system, which contains 0 to 255 * characters and can contain only letters, digits, hyphens (-), and underscores (_). */ readonly description: pulumi.Output<string>; /** * The enterprise project id of the shared file system. Changing * this creates a new resource. */ readonly enterpriseProjectId: pulumi.Output<string>; /** * The address for accessing the shared file system. */ readonly exportLocation: pulumi.Output<string>; /** * Specifies whether a file system can be publicly seen. * The default value is false. */ readonly isPublic: pulumi.Output<boolean | undefined>; /** * Specifies the metadata information used to create the shared file system. The * supported metadata keys are "#sfs_crypt_key_id", "#sfs_crypt_domain_id" and "#sfs_crypt_alias", and the keys should be * exist at the same time to enable the data encryption function. Changing this will create a new resource. */ readonly metadata: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Specifies the name of the shared file system, which contains 0 to 255 characters and * can contain only letters, digits, hyphens (-), and underscores (_). */ readonly name: pulumi.Output<string>; /** * The region in which to create the sfs resource. If omitted, the provider-level * region will be used. Changing this creates a new sfs resource. */ readonly region: pulumi.Output<string>; /** * The UUID of the share access rule. */ readonly shareAccessId: pulumi.Output<string>; /** * Specifies the file system sharing protocol. * The valid value can be **NFS** (for Linux OS) or **CIFS** (for Windows OS). */ readonly shareProto: pulumi.Output<string | undefined>; /** * Specifies the size (GB) of the shared file system. */ readonly size: pulumi.Output<number>; /** * The status of the share access rule. */ readonly status: pulumi.Output<string>; /** * The key/value pairs to associate with the shared file system. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Create a FileSystem 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: FileSystemArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering FileSystem resources. */ export interface FileSystemState { /** * Specifies the access level of the shared file system. Possible values are *ro* ( * read-only) * and *rw* (read-write). The default value is *rw* (read/write). Changing this will create a new access rule. */ accessLevel?: pulumi.Input<string>; /** * The status of the share access rule. */ accessRuleStatus?: pulumi.Input<string>; /** * All access rules of the shared file system. The object includes the following: */ accessRules?: pulumi.Input<pulumi.Input<inputs.Sfs.FileSystemAccessRule>[]>; /** * Specifies the value that defines the access rule. The value contains 1 to 255 * characters. Changing this will create a new access rule. The value varies according to the scenario: * + Set the VPC ID in VPC authorization scenarios. * + Set this parameter in IP address authorization scenario: * - For an NFS shared file system, the value in the format of *VPC_ID#IP_address#priority#user_permission*. * For example, 0157b53f-4974-4e80-91c9-098532bcaf00#2.2.2.2/16#100#all_squash,root_squash. * - For a CIFS shared file system, the value in the format of *VPC_ID#IP_address#priority*. * For example, 0157b53f-4974-4e80-91c9-098532bcaf00#2.2.2.2/16#0. */ accessTo?: pulumi.Input<string>; /** * Specifies the type of the share access rule. The default value is *cert*. Changing * this will create a new access rule. */ accessType?: pulumi.Input<string>; /** * Specifies the availability zone name. Changing this parameter will * create a new resource. */ availabilityZone?: pulumi.Input<string>; /** * Specifies the description of the shared file system, which contains 0 to 255 * characters and can contain only letters, digits, hyphens (-), and underscores (_). */ description?: pulumi.Input<string>; /** * The enterprise project id of the shared file system. Changing * this creates a new resource. */ enterpriseProjectId?: pulumi.Input<string>; /** * The address for accessing the shared file system. */ exportLocation?: pulumi.Input<string>; /** * Specifies whether a file system can be publicly seen. * The default value is false. */ isPublic?: pulumi.Input<boolean>; /** * Specifies the metadata information used to create the shared file system. The * supported metadata keys are "#sfs_crypt_key_id", "#sfs_crypt_domain_id" and "#sfs_crypt_alias", and the keys should be * exist at the same time to enable the data encryption function. Changing this will create a new resource. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Specifies the name of the shared file system, which contains 0 to 255 characters and * can contain only letters, digits, hyphens (-), and underscores (_). */ name?: pulumi.Input<string>; /** * The region in which to create the sfs resource. If omitted, the provider-level * region will be used. Changing this creates a new sfs resource. */ region?: pulumi.Input<string>; /** * The UUID of the share access rule. */ shareAccessId?: pulumi.Input<string>; /** * Specifies the file system sharing protocol. * The valid value can be **NFS** (for Linux OS) or **CIFS** (for Windows OS). */ shareProto?: pulumi.Input<string>; /** * Specifies the size (GB) of the shared file system. */ size?: pulumi.Input<number>; /** * The status of the share access rule. */ status?: pulumi.Input<string>; /** * The key/value pairs to associate with the shared file system. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; } /** * The set of arguments for constructing a FileSystem resource. */ export interface FileSystemArgs { /** * Specifies the access level of the shared file system. Possible values are *ro* ( * read-only) * and *rw* (read-write). The default value is *rw* (read/write). Changing this will create a new access rule. */ accessLevel?: pulumi.Input<string>; /** * Specifies the value that defines the access rule. The value contains 1 to 255 * characters. Changing this will create a new access rule. The value varies according to the scenario: * + Set the VPC ID in VPC authorization scenarios. * + Set this parameter in IP address authorization scenario: * - For an NFS shared file system, the value in the format of *VPC_ID#IP_address#priority#user_permission*. * For example, 0157b53f-4974-4e80-91c9-098532bcaf00#2.2.2.2/16#100#all_squash,root_squash. * - For a CIFS shared file system, the value in the format of *VPC_ID#IP_address#priority*. * For example, 0157b53f-4974-4e80-91c9-098532bcaf00#2.2.2.2/16#0. */ accessTo?: pulumi.Input<string>; /** * Specifies the type of the share access rule. The default value is *cert*. Changing * this will create a new access rule. */ accessType?: pulumi.Input<string>; /** * Specifies the availability zone name. Changing this parameter will * create a new resource. */ availabilityZone?: pulumi.Input<string>; /** * Specifies the description of the shared file system, which contains 0 to 255 * characters and can contain only letters, digits, hyphens (-), and underscores (_). */ description?: pulumi.Input<string>; /** * The enterprise project id of the shared file system. Changing * this creates a new resource. */ enterpriseProjectId?: pulumi.Input<string>; /** * Specifies whether a file system can be publicly seen. * The default value is false. */ isPublic?: pulumi.Input<boolean>; /** * Specifies the metadata information used to create the shared file system. The * supported metadata keys are "#sfs_crypt_key_id", "#sfs_crypt_domain_id" and "#sfs_crypt_alias", and the keys should be * exist at the same time to enable the data encryption function. Changing this will create a new resource. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Specifies the name of the shared file system, which contains 0 to 255 characters and * can contain only letters, digits, hyphens (-), and underscores (_). */ name?: pulumi.Input<string>; /** * The region in which to create the sfs resource. If omitted, the provider-level * region will be used. Changing this creates a new sfs resource. */ region?: pulumi.Input<string>; /** * Specifies the file system sharing protocol. * The valid value can be **NFS** (for Linux OS) or **CIFS** (for Windows OS). */ shareProto?: pulumi.Input<string>; /** * Specifies the size (GB) of the shared file system. */ size: pulumi.Input<number>; /** * The key/value pairs to associate with the shared file system. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; }