Manages an Amazon FSx for OpenZFS volume. See the FSx OpenZFS User Guide for more information.
resource "aws_fsx_openzfs_volume" "test" {
name = "testvolume"
parent_volume_id = aws_fsx_openzfs_file_system.test.root_volume_id
}
This resource supports the following arguments:
name
- (Required) The name of the Volume. You can use a maximum of 203 alphanumeric characters, plus the underscore (_) special character.parent_volume_id
- (Required) The volume id of volume that will be the parent volume for the volume being created, this could be the root volume created from the aws_fsx_openzfs_file_system
resource with the root_volume_id
or the id
property of another aws_fsx_openzfs_volume
.copy_tags_to_snapshots
- (Optional) A boolean flag indicating whether tags for the file system should be copied to snapshots. The default value is false.data_compression_type
- (Optional) Method used to compress the data on the volume. Valid values are NONE
or ZSTD
. Child volumes that don't specify compression option will inherit from parent volume. This option on file system applies to the root volume.delete_volume_options
- (Optional) Whether to delete all child volumes and snapshots. Valid values: DELETE_CHILD_VOLUMES_AND_SNAPSHOTS
. This configuration must be applied separately before attempting to delete the resource to have the desired behavior..nfs_exports
- (Optional) NFS export configuration for the root volume. Exactly 1 item. See nfs_exports
Block Below for details.read_only
- (Optional) specifies whether the volume is read-only. Default is false.record_size_kib
- (Optional) The record size of an OpenZFS volume, in kibibytes (KiB). Valid values are 4
, 8
, 16
, 32
, 64
, 128
, 256
, 512
, or 1024
KiB. The default is 128
KiB.origin_snapshot
- (Optional) Specifies the configuration to use when creating the OpenZFS volume. See origin_snapshot
Block below for details.storage_capacity_quota_gib
- (Optional) The maximum amount of storage in gibibytes (GiB) that the volume can use from its parent.storage_capacity_reservation_gib
- (Optional) The amount of storage in gibibytes (GiB) to reserve from the parent volume.user_and_group_quotas
- (Optional) - Specify how much storage users or groups can use on the volume. Maximum of 100 items. See user_and_group_quotas
Block Below.tags
- (Optional) A map of tags to assign to the file system. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.nfs_exports
BlockThe nfs_exports
configuration block supports the following arguments:
client_configurations
- (Required) - A list of configuration objects that contain the client and options for mounting the OpenZFS file system. Maximum of 25 items. See client_configurations
Block below for details.client_configurations
BlockThe client_configurations
configuration block supports the following arguments:
clients
- (Required) - A value that specifies who can mount the file system. You can provide a wildcard character (*), an IP address (0.0.0.0), or a CIDR address (192.0.2.0/24. By default, Amazon FSx uses the wildcard character when specifying the client.options
- (Required) - The options to use when mounting the file system. Maximum of 20 items. See the Linix NFS exports man page for more information. crossmount
and sync
are used by default.origin_snapshot
BlockThe origin_snapshot
configuration block supports the following arguments:
copy_strategy
- (Required) - Specifies the strategy used when copying data from the snapshot to the new volume. Valid values are CLONE
, FULL_COPY
, INCREMENTAL_COPY
.snapshot_arn
- (Required) - The Amazon Resource Name (ARN) of the origin snapshot.user_and_group_quotas
BlockThe user_and_group_quotas
configuration block supports the following arguments:
id
- (Required) - The ID of the user or group. Valid values between 0
and 2147483647
storage_capacity_quota_gib
- (Required) - The amount of storage that the user or group can use in gibibytes (GiB). Valid values between 0
and 2147483647
Type
- (Required) - A value that specifies whether the quota applies to a user or group. Valid values are USER
or GROUP
.This resource exports the following attributes in addition to the arguments above:
arn
- Amazon Resource Name of the file system.id
- Identifier of the file system, e.g., fsvol-12345678
tags_all
- A map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.create
- (Default 30m
)update
- (Default 30m
)delete
- (Default 30m
)In Terraform v1.5.0 and later, use an import
block to import FSx Volumes using the id
. For example:
import {
to = aws_fsx_openzfs_volume.example
id = "fsvol-543ab12b1ca672f33"
}
Using terraform import
, import FSx Volumes using the id
. For example:
% terraform import aws_fsx_openzfs_volume.example fsvol-543ab12b1ca672f33