alicloud_nas_snapshot
更新时间:
Provides a Apsara File Storage (NAS) Snapshot resource.
For information about Apsara File Storage (NAS) Snapshot and how to use it, see What is Snapshot.
-> NOTE: Available in v1.152.0+.
-> NOTE: Only Extreme NAS file systems support the snapshot feature.
Example Usage
Basic Usage
variable "name" {
default = "testacc"
}
data "alicloud_nas_zones" "default" {
file_system_type = "extreme"
}
resource "alicloud_nas_file_system" "default" {
file_system_type = "extreme"
protocol_type = "NFS"
zone_id = data.alicloud_nas_zones.default.zones.0.zone_id
storage_type = "standard"
capacity = 100
}
resource "alicloud_nas_snapshot" "default" {
file_system_id = alicloud_nas_file_system.default.id
description = var.name
retention_days = 20
snapshot_name = var.name
}
Argument Reference
The following arguments are supported:
description
- (Optional, ForceNew) The description of the snapshot. It must be2
to256
characters in length and cannot start withhttps://
orhttps://
.file_system_id
- (Required, ForceNew) The ID of the file system.retention_days
- (Optional, ForceNew) The retention period of the snapshot. Unit: days. Valid values:-1
: The default value. Auto snapshots are permanently retained. After the number of auto snapshots exceeds the upper limit, the earliest auto snapshot is automatically deleted.1
to65536
: Auto snapshots are retained for the specified days. After the retention period of auto snapshots expires, the auto snapshots are automatically deleted.
snapshot_name
- (Optional, ForceNew) SnapshotName. It must be2
to128
characters in length and must start with a letter, but cannot start withhttps://
orhttps://
.
Attributes Reference
The following attributes are exported:
id
- The resource ID in terraform of Snapshot.status
- The status of the snapshot.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 5 mins) Used when create the Snapshot.delete
- (Defaults to 5 mins) Used when delete the Snapshot.
Import
Apsara File Storage (NAS) Snapshot can be imported using the id, e.g.
$ terraform import alicloud_nas_snapshot.example <id>
文档内容是否对您有帮助?