Skip to content

Resource: awsFsxOpenzfsFileSystem

Manages an Amazon FSx for OpenZFS file system. See the FSx OpenZFS User Guide for more information.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.fsxOpenzfsFileSystem.FsxOpenzfsFileSystem(this, "test", {
  deploymentType: "SINGLE_AZ_1",
  storageCapacity: 64,
  subnetIds: ["${aws_subnet.test1.id}"],
  throughputCapacity: 64,
});

Argument Reference

The following arguments are supported:

  • deploymentType - (Required) - The filesystem deployment type. Valid values: SINGLE_AZ_1 and SINGLE_AZ_2.
  • storageCapacity - (Required) The storage capacity (GiB) of the file system. Valid values between 64 and 524288.
  • subnetIds - (Required) A list of IDs for the subnets that the file system will be accessible from. Exactly 1 subnet need to be provided.
  • throughputCapacity - (Required) Throughput (MB/s) of the file system. Valid values depend on deploymentType. Must be one of 64, 128, 256, 512, 1024, 2048, 3072, 4096 for SINGLE_AZ_1. Must be one of 160, 320, 640, 1280, 2560, 3840, 5120, 7680, 10240 for SINGLE_AZ_2.
  • automaticBackupRetentionDays - (Optional) The number of days to retain automatic backups. Setting this to 0 disables automatic backups. You can retain automatic backups for a maximum of 90 days.
  • backupId - (Optional) The ID of the source backup to create the filesystem from.
  • copyTagsToBackups - (Optional) A boolean flag indicating whether tags for the file system should be copied to backups. The default value is false.
  • copyTagsToVolumes - (Optional) A boolean flag indicating whether tags for the file system should be copied to snapshots. The default value is false.
  • dailyAutomaticBackupStartTime - (Optional) A recurring daily time, in the format HH:MM. HH is the zero-padded hour of the day (0-23), and MM is the zero-padded minute of the hour. For example, 05:00 specifies 5 AM daily. Requires automaticBackupRetentionDays to be set.
  • diskIopsConfiguration - (Optional) The SSD IOPS configuration for the Amazon FSx for OpenZFS file system. See Disk Iops Configuration Below.
  • kmsKeyId - (Optional) ARN for the KMS Key to encrypt the file system at rest, Defaults to an AWS managed KMS Key.
  • rootVolumeConfiguration - (Optional) The configuration for the root volume of the file system. All other volumes are children or the root volume. See Root Volume Configuration Below.
  • securityGroupIds - (Optional) A list of IDs for the security groups that apply to the specified network interfaces created for file system access. These security groups will apply to all network interfaces.
  • storageType - (Optional) The filesystem storage type. Only ssd is supported.
  • tags - (Optional) A map of tags to assign to the file system. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
  • weeklyMaintenanceStartTime - (Optional) The preferred start time (in d:hh:mm format) to perform weekly maintenance, in the UTC time zone.

Disk Iops Configuration

  • iops - (Optional) - The total number of SSD IOPS provisioned for the file system.
  • mode - (Optional) - Specifies whether the number of IOPS for the file system is using the system. Valid values are automatic and USER_PROVISIONED. Default value is automatic.

Root Volume Configuration

  • copyTagsToSnapshots - (Optional) - A boolean flag indicating whether tags for the file system should be copied to snapshots. The default value is false.
  • dataCompressionType - (Optional) - Method used to compress the data on the volume. Valid values are lz4, 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.
  • nfsExports - (Optional) - NFS export configuration for the root volume. Exactly 1 item. See NFS Exports Below.
  • readOnly - (Optional) - specifies whether the volume is read-only. Default is false.
  • recordSizeKib - (Optional) - Specifies the record size of an OpenZFS root volume, in kibibytes (KiB). Valid values are 4, 8, 16, 32, 64, 128, 256, 512, or 1024 KiB. The default is 128 KiB.
  • userAndGroupQuotas - (Optional) - Specify how much storage users or groups can use on the volume. Maximum of 100 items. See User and Group Quotas Below.

NFS Exports

  • clientConfigurations - (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](#client configurations) Below.

Client Configurations

  • 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.

User and Group Quotas

  • id - (Required) - The ID of the user or group. Valid values between 0 and 2147483647
  • storageCapacityQuotaGib - (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.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • arn - Amazon Resource Name of the file system.
  • dnsName - DNS name for the file system, e.g., fs12345678FsxUsWest2AmazonawsCom
  • id - Identifier of the file system, e.g., fs12345678
  • networkInterfaceIds - Set of Elastic Network Interface identifiers from which the file system is accessible The first network interface returned is the primary network interface.
  • rootVolumeId - Identifier of the root volume, e.g., fsvol12345678
  • ownerId - AWS account identifier that created the file system.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
  • vpcId - Identifier of the Virtual Private Cloud for the file system.

Timeouts

Configuration options:

  • create - (Default 60M)
  • update - (Default 60M)
  • delete - (Default 60M)

Import

FSx File Systems can be imported using the id, e.g.,

$ terraform import aws_fsx_openzfs_file_system.example fs-543ab12b1ca672f33

Certain resource arguments, like securityGroupIds, do not have a FSx API method for reading the information after creation. If the argument is set in the Terraform configuration on an imported resource, Terraform will always show a difference. To workaround this behavior, either omit the argument from the Terraform configuration or use ignoreChanges to hide the difference, e.g.,

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsFsxOpenzfsFileSystemExample =
  new aws.fsxOpenzfsFileSystem.FsxOpenzfsFileSystem(this, "example", {
    securityGroupIds: ["${aws_security_group.example.id}"],
  });
awsFsxOpenzfsFileSystemExample.addOverride("lifecycle", [
  {
    ignore_changes: ["${security_group_ids}"],
  },
]);