FileSystem

class FileSystem : KotlinCustomResource

Provides a File Storage (NAS) File System resource. File System Instance. For information about File Storage (NAS) File System and how to use it, see What is File System.

NOTE: Available since v1.33.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = alicloud.nas.getZones({
fileSystemType: "standard",
});
const defaultFileSystem = new alicloud.nas.FileSystem("default", {
protocolType: "NFS",
storageType: "Capacity",
description: name,
encryptType: 1,
fileSystemType: "standard",
recycleBin: {
status: "Enable",
reservedDays: 10,
},
nfsAcl: {
enabled: true,
},
zoneId: _default.then(_default => _default.zones?.[0]?.zoneId),
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.nas.get_zones(file_system_type="standard")
default_file_system = alicloud.nas.FileSystem("default",
protocol_type="NFS",
storage_type="Capacity",
description=name,
encrypt_type=1,
file_system_type="standard",
recycle_bin={
"status": "Enable",
"reserved_days": 10,
},
nfs_acl={
"enabled": True,
},
zone_id=default.zones[0].zone_id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.Nas.GetZones.Invoke(new()
{
FileSystemType = "standard",
});
var defaultFileSystem = new AliCloud.Nas.FileSystem("default", new()
{
ProtocolType = "NFS",
StorageType = "Capacity",
Description = name,
EncryptType = 1,
FileSystemType = "standard",
RecycleBin = new AliCloud.Nas.Inputs.FileSystemRecycleBinArgs
{
Status = "Enable",
ReservedDays = 10,
},
NfsAcl = new AliCloud.Nas.Inputs.FileSystemNfsAclArgs
{
Enabled = true,
},
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.ZoneId)),
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/nas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := nas.GetZones(ctx, &nas.GetZonesArgs{
FileSystemType: pulumi.StringRef("standard"),
}, nil)
if err != nil {
return err
}
_, err = nas.NewFileSystem(ctx, "default", &nas.FileSystemArgs{
ProtocolType: pulumi.String("NFS"),
StorageType: pulumi.String("Capacity"),
Description: pulumi.String(name),
EncryptType: pulumi.Int(1),
FileSystemType: pulumi.String("standard"),
RecycleBin: &nas.FileSystemRecycleBinArgs{
Status: pulumi.String("Enable"),
ReservedDays: pulumi.Int(10),
},
NfsAcl: &nas.FileSystemNfsAclArgs{
Enabled: pulumi.Bool(true),
},
ZoneId: pulumi.String(_default.Zones[0].ZoneId),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.nas.NasFunctions;
import com.pulumi.alicloud.nas.inputs.GetZonesArgs;
import com.pulumi.alicloud.nas.FileSystem;
import com.pulumi.alicloud.nas.FileSystemArgs;
import com.pulumi.alicloud.nas.inputs.FileSystemRecycleBinArgs;
import com.pulumi.alicloud.nas.inputs.FileSystemNfsAclArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var default = NasFunctions.getZones(GetZonesArgs.builder()
.fileSystemType("standard")
.build());
var defaultFileSystem = new FileSystem("defaultFileSystem", FileSystemArgs.builder()
.protocolType("NFS")
.storageType("Capacity")
.description(name)
.encryptType(1)
.fileSystemType("standard")
.recycleBin(FileSystemRecycleBinArgs.builder()
.status("Enable")
.reservedDays(10)
.build())
.nfsAcl(FileSystemNfsAclArgs.builder()
.enabled(true)
.build())
.zoneId(default_.zones()[0].zoneId())
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultFileSystem:
type: alicloud:nas:FileSystem
name: default
properties:
protocolType: NFS
storageType: Capacity
description: ${name}
encryptType: 1
fileSystemType: standard
recycleBin:
status: Enable
reservedDays: '10'
nfsAcl:
enabled: true
zoneId: ${default.zones[0].zoneId}
variables:
default:
fn::invoke:
function: alicloud:nas:getZones
arguments:
fileSystemType: standard

Import

File Storage (NAS) File System can be imported using the id, e.g.

$ pulumi import alicloud:nas/fileSystem:FileSystem example <id>

Properties

Link copied to clipboard
val capacity: Output<Int>

File system capacity. Unit: GiB, required and valid when FileSystemType = extreme or cpfs. For optional values, please refer to the actual specifications on the purchase page: -Fast NAS Pay-As-You-Go Page(https://common-buy.aliyun.com/? commodityCode=nas_extreme_post#/buy) -Fast NAS Package Monthly Purchase Page(https://common-buy.aliyun.com/? commodityCode=nas_extreme#/buy) -Parallel File System CPFS Pay-As-You-Go Purchase Page(https://common-buy.aliyun.com/? commodityCode=nas_cpfs_post#/buy) -Parallel File System CPFS Package Monthly Purchase Page(https://common-buy.aliyun.com/? commodityCode=cpfs#/buy)

Link copied to clipboard
val createTime: Output<String>

CreateTime

Link copied to clipboard
val description: Output<String>?

File system description. Restrictions:

Link copied to clipboard
val encryptType: Output<Int>

Whether the file system is encrypted. Use the KMS service hosting key to encrypt and store the file system disk data. When reading and writing encrypted data, there is no need to decrypt it. Value:

Link copied to clipboard
val fileSystemType: Output<String>

File system type. Value:

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val keytab: Output<String>?

String of keytab file content encrypted by base64

Link copied to clipboard
val keytabMd5: Output<String>?

String of the keytab file content encrypted by MD5

Link copied to clipboard
val kmsKeyId: Output<String>

The ID of the KMS key. This parameter is required only when EncryptType = 2.

Link copied to clipboard

NFS ACL See nfs_acl below.

Link copied to clipboard

Option. See options below.

Link copied to clipboard
val protocolType: Output<String>

File transfer protocol type.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Recycle Bin See recycle_bin below.

Link copied to clipboard
val regionId: Output<String>

RegionId

Link copied to clipboard
val resourceGroupId: Output<String>

The ID of the resource group.

Link copied to clipboard

SMB ACL See smb_acl below.

Link copied to clipboard
val snapshotId: Output<String>?

Only extreme NAS is supported.

Link copied to clipboard
val status: Output<String>

File system status. Includes:(such as creating a mount point) can only be performed when the file system is in the Running state.

Link copied to clipboard
val storageType: Output<String>

The storage type.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Label information collection.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vpcId: Output<String>?

The ID of the VPC network. This parameter must be configured when FileSystemType = cpfs. When the FileSystemType is standard or extreme, this parameter is reserved for the interface and has not taken effect yet. You do not need to configure it.

Link copied to clipboard
val vswitchId: Output<String>?

The ID of the switch. This parameter must be configured when FileSystemType = cpfs. When the FileSystemType is standard or extreme, this parameter is reserved for the interface and has not taken effect yet. You do not need to configure it.

Link copied to clipboard
val zoneId: Output<String>

The zone ID. The usable area refers to the physical area where power and network are independent of each other in the same area. When the FileSystemType is set to standard, this parameter is optional. By default, a zone that meets the conditions is randomly selected based on the ProtocolType and StorageType configurations. This parameter is required when FileSystemType = extreme or FileSystemType = cpfs.