alicloud_nas_fileset
更新时间:
Provides a Network Attached Storage (NAS) Fileset resource.
For information about Network Attached Storage (NAS) Fileset and how to use it, see What is Fileset.
-> NOTE: Available in v1.153.0+.
Example Usage
Basic Usage
provider "alicloud" {
region = "cn-zhangjiakou"
}
data "alicloud_nas_zones" "example" {
file_system_type = "cpfs"
}
resource "alicloud_vpc" "example" {
vpc_name = "terraform-example"
cidr_block = "172.17.3.0/24"
}
resource "alicloud_vswitch" "example" {
vswitch_name = "terraform-example"
cidr_block = "172.17.3.0/24"
vpc_id = alicloud_vpc.example.id
zone_id = data.alicloud_nas_zones.example.zones[1].zone_id
}
resource "alicloud_nas_file_system" "example" {
protocol_type = "cpfs"
storage_type = "advance_200"
file_system_type = "cpfs"
capacity = 3600
zone_id = data.alicloud_nas_zones.example.zones[1].zone_id
vpc_id = alicloud_vpc.example.id
vswitch_id = alicloud_vswitch.example.id
}
resource "alicloud_nas_fileset" "example" {
file_system_id = alicloud_nas_file_system.example.id
description = "terraform-example"
file_system_path = "/example_path/"
}
Argument Reference
The following arguments are supported:
description
- (Optional) The description of the Fileset. It must be2
to128
characters in length and must start with a letter or Chinese, but cannot start withhttps://
orhttps://
.dry_run
- (Optional) The dry run.file_system_id
- (Required, ForceNew) The ID of the file system.file_system_path
- (Required, ForceNew) The path of the fileset.
Attributes Reference
The following attributes are exported:
id
- The resource ID of the file set. The value formats as<file_system_id>:<fileset_id>
.fileset_id
- The first ID of the resource.status
- The status of the fileset.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 1 mins) Used when create the fileset.delete
- (Defaults to 1 mins) Used when delete the fileset.
Import
Network Attached Storage (NAS) Fileset can be imported using the id, e.g.
$ terraform import alicloud_nas_fileset.example <file_system_id>:<fileset_id>
文档内容是否对您有帮助?