@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
512 lines (511 loc) • 19 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a SFS Turbo resource within HuaweiCloud.
*
* ## Example Usage
* ### Create a STANDARD Shared File System (SFS) Turbo
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const vpcId = config.requireObject("vpcId");
* const subnetId = config.requireObject("subnetId");
* const secgroupId = config.requireObject("secgroupId");
* const testAz = config.requireObject("testAz");
* const test = new huaweicloud.sfs.Turbo("test", {
* size: 500,
* shareProto: "NFS",
* vpcId: vpcId,
* subnetId: subnetId,
* securityGroupId: secgroupId,
* availabilityZone: testAz,
* tags: {
* foo: "bar",
* key: "value",
* },
* });
* ```
* ### Create an HPC Shared File System (SFS) Turbo
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const vpcId = config.requireObject("vpcId");
* const subnetId = config.requireObject("subnetId");
* const secgroupId = config.requireObject("secgroupId");
* const testAz = config.requireObject("testAz");
* const test = new huaweicloud.sfs.Turbo("test", {
* size: 3686,
* shareProto: "NFS",
* shareType: "HPC",
* hpcBandwidth: "40M",
* vpcId: vpcId,
* subnetId: subnetId,
* securityGroupId: secgroupId,
* availabilityZone: testAz,
* });
* ```
* ### Create an HPC CACHE Shared File System (SFS) Turbo
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const vpcId = config.requireObject("vpcId");
* const subnetId = config.requireObject("subnetId");
* const secgroupId = config.requireObject("secgroupId");
* const testAz = config.requireObject("testAz");
* const test = new huaweicloud.sfs.Turbo("test", {
* size: 4096,
* shareProto: "NFS",
* shareType: "HPC_CACHE",
* hpcCacheBandwidth: "2G",
* vpcId: vpcId,
* subnetId: subnetId,
* securityGroupId: secgroupId,
* availabilityZone: testAz,
* });
* ```
*
* ## Import
*
* The resource can be imported using the `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Sfs/turbo:Turbo test <id>
* ```
*
* Note that the imported state may not be identical to your resource definition, due to payment attributes missing from the API response. The missing attributes include`charging_mode`, `period_unit`, `period`, `auto_renew`. It is generally recommended running `terraform plan` after importing an instance. You can ignore changes as below. hcl resource "huaweicloud_sfs_turbo" "test" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* charging_mode, period_unit, period, auto_renew,
*
* ]
*
* } }
*/
export declare class Turbo extends pulumi.CustomResource {
/**
* Get an existing Turbo 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?: TurboState, opts?: pulumi.CustomResourceOptions): Turbo;
/**
* Returns true if the given object is an instance of Turbo. 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 Turbo;
/**
* Specifies whether auto renew is enabled.
* The valid values are **true** and **false**.
*/
readonly autoRenew: pulumi.Output<string | undefined>;
/**
* Specifies the availability zone where the file system is located.
* Changing this will create a new resource.
*/
readonly availabilityZone: pulumi.Output<string>;
/**
* The available capacity of the SFS Turbo file system in the unit of GB.
*/
readonly availableCapacity: pulumi.Output<string>;
/**
* Specifies the backup ID.
*/
readonly backupId: pulumi.Output<string>;
/**
* Specifies the charging mode of the SFS Turbo.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
* Changing this parameter will create a new cluster resource.
*/
readonly chargingMode: pulumi.Output<string>;
/**
* Specifies the ID of a KMS key to encrypt the file system. Changing this
* will create a new resource.
*/
readonly cryptKeyId: pulumi.Output<string | undefined>;
/**
* Specifies the VM flavor used for creating a dedicated file system.
*/
readonly dedicatedFlavor: pulumi.Output<string | undefined>;
/**
* Specifies the ID of the dedicated distributed storage used
* when creating a dedicated file system.
*/
readonly dedicatedStorageId: pulumi.Output<string | undefined>;
/**
* Specifies whether the file system is enhanced or not. Changing this will
* create a new resource.
*/
readonly enhanced: pulumi.Output<boolean>;
/**
* The enterprise project id of the file system. Changing this
* will create a new resource.
*/
readonly enterpriseProjectId: pulumi.Output<string>;
/**
* The mount point of the SFS Turbo file system.
*/
readonly exportLocation: pulumi.Output<string>;
/**
* Specifies the HPC bandwidth. Changing this will create a new resource.
* This parameter is valid and required when `shareType` is set to **HPC**.
* Valid values are: **20M**, **40M**, **125M**, **250M**, **500M** and **1000M**.
*/
readonly hpcBandwidth: pulumi.Output<string>;
/**
* Specifies the HPC cache bandwidth(GB/s).
* This parameter is valid and required when `shareType` is set to **HPC_CACHE**.
* Valid values are: **2G**, **4G**, **8G**, **16G**, **24G**, **32G** and **48G**.
*/
readonly hpcCacheBandwidth: pulumi.Output<string>;
/**
* Specifies the name of an SFS Turbo file system. The value contains `4` to `64`
* characters and must start with a letter.
*/
readonly name: pulumi.Output<string>;
/**
* Specifies the charging period of the SFS Turbo.
* If `periodUnit` is set to **month**, the value ranges from `1` to `11`.
* If `periodUnit` is set to **year**, the value ranges from `1` to `3`.
* This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
readonly period: pulumi.Output<number | undefined>;
/**
* Specifies the charging period unit of the SFS Turbo.
* Valid values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
readonly periodUnit: pulumi.Output<string | undefined>;
/**
* The region in which to create the SFS Turbo resource. If omitted, the
* provider-level region will be used. Changing this creates a new SFS Turbo resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the security group ID.
*/
readonly securityGroupId: pulumi.Output<string>;
/**
* Specifies the protocol for sharing file systems. The valid value is NFS.
* Changing this will create a new resource.
*/
readonly shareProto: pulumi.Output<string | undefined>;
/**
* Specifies the file system type. Changing this will create a new resource.
* Valid values are **STANDARD**, **PERFORMANCE**, **HPC** and **HPC_CACHE**.
* Defaults to **STANDARD**.
*/
readonly shareType: pulumi.Output<string | undefined>;
/**
* Specifies the capacity of a sharing file system, in GB.
* + If `shareType` is set to **STANDARD** or **PERFORMANCE**, the value ranges from `500` to `32,768`, and ranges from
* `10,240` to `327,680` for an enhanced file system.
*/
readonly size: pulumi.Output<number>;
/**
* The status of the SFS Turbo file system.
*/
readonly status: pulumi.Output<string>;
/**
* Specifies the network ID of the subnet. Changing this will create a new
* resource.
*/
readonly subnetId: pulumi.Output<string>;
/**
* Specifies the key/value pairs to associate with the SFS Turbo.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The version ID of the SFS Turbo file system.
*/
readonly version: pulumi.Output<string>;
/**
* Specifies the VPC ID. Changing this will create a new resource.
*/
readonly vpcId: pulumi.Output<string>;
/**
* Create a Turbo 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: TurboArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Turbo resources.
*/
export interface TurboState {
/**
* Specifies whether auto renew is enabled.
* The valid values are **true** and **false**.
*/
autoRenew?: pulumi.Input<string>;
/**
* Specifies the availability zone where the file system is located.
* Changing this will create a new resource.
*/
availabilityZone?: pulumi.Input<string>;
/**
* The available capacity of the SFS Turbo file system in the unit of GB.
*/
availableCapacity?: pulumi.Input<string>;
/**
* Specifies the backup ID.
*/
backupId?: pulumi.Input<string>;
/**
* Specifies the charging mode of the SFS Turbo.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
* Changing this parameter will create a new cluster resource.
*/
chargingMode?: pulumi.Input<string>;
/**
* Specifies the ID of a KMS key to encrypt the file system. Changing this
* will create a new resource.
*/
cryptKeyId?: pulumi.Input<string>;
/**
* Specifies the VM flavor used for creating a dedicated file system.
*/
dedicatedFlavor?: pulumi.Input<string>;
/**
* Specifies the ID of the dedicated distributed storage used
* when creating a dedicated file system.
*/
dedicatedStorageId?: pulumi.Input<string>;
/**
* Specifies whether the file system is enhanced or not. Changing this will
* create a new resource.
*/
enhanced?: pulumi.Input<boolean>;
/**
* The enterprise project id of the file system. Changing this
* will create a new resource.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* The mount point of the SFS Turbo file system.
*/
exportLocation?: pulumi.Input<string>;
/**
* Specifies the HPC bandwidth. Changing this will create a new resource.
* This parameter is valid and required when `shareType` is set to **HPC**.
* Valid values are: **20M**, **40M**, **125M**, **250M**, **500M** and **1000M**.
*/
hpcBandwidth?: pulumi.Input<string>;
/**
* Specifies the HPC cache bandwidth(GB/s).
* This parameter is valid and required when `shareType` is set to **HPC_CACHE**.
* Valid values are: **2G**, **4G**, **8G**, **16G**, **24G**, **32G** and **48G**.
*/
hpcCacheBandwidth?: pulumi.Input<string>;
/**
* Specifies the name of an SFS Turbo file system. The value contains `4` to `64`
* characters and must start with a letter.
*/
name?: pulumi.Input<string>;
/**
* Specifies the charging period of the SFS Turbo.
* If `periodUnit` is set to **month**, the value ranges from `1` to `11`.
* If `periodUnit` is set to **year**, the value ranges from `1` to `3`.
* This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
period?: pulumi.Input<number>;
/**
* Specifies the charging period unit of the SFS Turbo.
* Valid values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
periodUnit?: pulumi.Input<string>;
/**
* The region in which to create the SFS Turbo resource. If omitted, the
* provider-level region will be used. Changing this creates a new SFS Turbo resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the security group ID.
*/
securityGroupId?: pulumi.Input<string>;
/**
* Specifies the protocol for sharing file systems. The valid value is NFS.
* Changing this will create a new resource.
*/
shareProto?: pulumi.Input<string>;
/**
* Specifies the file system type. Changing this will create a new resource.
* Valid values are **STANDARD**, **PERFORMANCE**, **HPC** and **HPC_CACHE**.
* Defaults to **STANDARD**.
*/
shareType?: pulumi.Input<string>;
/**
* Specifies the capacity of a sharing file system, in GB.
* + If `shareType` is set to **STANDARD** or **PERFORMANCE**, the value ranges from `500` to `32,768`, and ranges from
* `10,240` to `327,680` for an enhanced file system.
*/
size?: pulumi.Input<number>;
/**
* The status of the SFS Turbo file system.
*/
status?: pulumi.Input<string>;
/**
* Specifies the network ID of the subnet. Changing this will create a new
* resource.
*/
subnetId?: pulumi.Input<string>;
/**
* Specifies the key/value pairs to associate with the SFS Turbo.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The version ID of the SFS Turbo file system.
*/
version?: pulumi.Input<string>;
/**
* Specifies the VPC ID. Changing this will create a new resource.
*/
vpcId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Turbo resource.
*/
export interface TurboArgs {
/**
* Specifies whether auto renew is enabled.
* The valid values are **true** and **false**.
*/
autoRenew?: pulumi.Input<string>;
/**
* Specifies the availability zone where the file system is located.
* Changing this will create a new resource.
*/
availabilityZone: pulumi.Input<string>;
/**
* Specifies the backup ID.
*/
backupId?: pulumi.Input<string>;
/**
* Specifies the charging mode of the SFS Turbo.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
* Changing this parameter will create a new cluster resource.
*/
chargingMode?: pulumi.Input<string>;
/**
* Specifies the ID of a KMS key to encrypt the file system. Changing this
* will create a new resource.
*/
cryptKeyId?: pulumi.Input<string>;
/**
* Specifies the VM flavor used for creating a dedicated file system.
*/
dedicatedFlavor?: pulumi.Input<string>;
/**
* Specifies the ID of the dedicated distributed storage used
* when creating a dedicated file system.
*/
dedicatedStorageId?: pulumi.Input<string>;
/**
* Specifies whether the file system is enhanced or not. Changing this will
* create a new resource.
*/
enhanced?: pulumi.Input<boolean>;
/**
* The enterprise project id of the file system. Changing this
* will create a new resource.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Specifies the HPC bandwidth. Changing this will create a new resource.
* This parameter is valid and required when `shareType` is set to **HPC**.
* Valid values are: **20M**, **40M**, **125M**, **250M**, **500M** and **1000M**.
*/
hpcBandwidth?: pulumi.Input<string>;
/**
* Specifies the HPC cache bandwidth(GB/s).
* This parameter is valid and required when `shareType` is set to **HPC_CACHE**.
* Valid values are: **2G**, **4G**, **8G**, **16G**, **24G**, **32G** and **48G**.
*/
hpcCacheBandwidth?: pulumi.Input<string>;
/**
* Specifies the name of an SFS Turbo file system. The value contains `4` to `64`
* characters and must start with a letter.
*/
name?: pulumi.Input<string>;
/**
* Specifies the charging period of the SFS Turbo.
* If `periodUnit` is set to **month**, the value ranges from `1` to `11`.
* If `periodUnit` is set to **year**, the value ranges from `1` to `3`.
* This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
period?: pulumi.Input<number>;
/**
* Specifies the charging period unit of the SFS Turbo.
* Valid values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
periodUnit?: pulumi.Input<string>;
/**
* The region in which to create the SFS Turbo resource. If omitted, the
* provider-level region will be used. Changing this creates a new SFS Turbo resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the security group ID.
*/
securityGroupId: pulumi.Input<string>;
/**
* Specifies the protocol for sharing file systems. The valid value is NFS.
* Changing this will create a new resource.
*/
shareProto?: pulumi.Input<string>;
/**
* Specifies the file system type. Changing this will create a new resource.
* Valid values are **STANDARD**, **PERFORMANCE**, **HPC** and **HPC_CACHE**.
* Defaults to **STANDARD**.
*/
shareType?: pulumi.Input<string>;
/**
* Specifies the capacity of a sharing file system, in GB.
* + If `shareType` is set to **STANDARD** or **PERFORMANCE**, the value ranges from `500` to `32,768`, and ranges from
* `10,240` to `327,680` for an enhanced file system.
*/
size: pulumi.Input<number>;
/**
* Specifies the network ID of the subnet. Changing this will create a new
* resource.
*/
subnetId: pulumi.Input<string>;
/**
* Specifies the key/value pairs to associate with the SFS Turbo.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the VPC ID. Changing this will create a new resource.
*/
vpcId: pulumi.Input<string>;
}